<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>perl5100delta - what is new for perl 5.10.0 - Perldoc Browser</title>
    <link rel="search" href="https://perldoc.perl.org/opensearch.xml" type="application/opensearchdescription+xml" title="Perldoc Browser">
    <link rel="canonical" href="https://perldoc.perl.org/perl5100delta">
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/stackoverflow-light.min.css" integrity="sha512-cG1IdFxqipi3gqLmksLtuk13C+hBa57a6zpWxMeoY3Q9O6ooFxq50DayCdm0QrDgZjMUn23z/0PMZlgft7Yp5Q==" crossorigin="anonymous" />
    <style>
      body {
        background: #f4f4f5;
        color: #020202;
      }
      .navbar-dark {
        background-image: -webkit-linear-gradient(top, #005f85 0, #002e49 100%);
        background-image: -o-linear-gradient(top, #005f85 0, #002e49 100%);
        background-image: linear-gradient(to bottom, #005f85 0, #002e49 100%);
        filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff005f85', endColorstr='#ff002e49', GradientType=0);
        background-repeat: repeat-x;
      }
      .navbar-dark .navbar-nav .nav-link,
      .navbar-dark .navbar-nav .nav-link:focus { color: #fff }
      .navbar-dark .navbar-nav .nav-link:hover { color: #ffef68 }
      #wrapperlicious {
        margin: 0 auto;
        font: 0.9em 'Helvetica Neue', Helvetica, sans-serif;
        font-weight: normal;
        line-height: 1.5em;
        margin: 0;
        padding: 0;
      }
      #wrapperlicious h1 { font-size: 1.5em }
      #wrapperlicious h2 { font-size: 1.3em }
      #wrapperlicious h3 { font-size: 1.1em }
      #wrapperlicious h4 { font-size: 0.9em }
      #wrapperlicious h1, #wrapperlicious h2, #wrapperlicious h3,
      #wrapperlicious h4, #wrapperlicious dt {
        color: #020202;
        margin-top: 1em;
        margin-bottom: 1em;
        position: relative;
        font-weight: bold;
      }
      #wrapperlicious a { color: inherit; text-decoration: underline }
      #wrapperlicious #toc { text-decoration: none }
      #wrapperlicious a:hover { color: #2a2a2a }
      #wrapperlicious a img { border: 0 }
      #wrapperlicious :not(pre) > code {
        color: inherit;
        background-color: rgba(0, 0, 0, 0.04);
        border-radius: 3px;
        font: 0.9em Consolas, Menlo, Monaco, monospace;
        padding: 0.3em;
      }
      #wrapperlicious dd {
        margin: 0;
        margin-left: 2em;
      }
      #wrapperlicious dt {
        color: #2a2a2a;
        font-weight: bold;
        margin-left: 0.9em;
      }
      #wrapperlicious p {
        margin-bottom: 1em;
        margin-top: 1em;
      }
      #wrapperlicious li > p {
        margin-bottom: 0;
        margin-top: 0;
      }
      #wrapperlicious pre {
        border: 1px solid #c1c1c1;
        border-radius: 3px;
        font: 100% Consolas, Menlo, Monaco, monospace;
        margin-bottom: 1em;
        margin-top: 1em;
      }
      #wrapperlicious pre > code {
        display: block;
        background-color: #f6f6f6;
        font: 0.9em Consolas, Menlo, Monaco, monospace;
        line-height: 1.5em;
        text-align: left;
        white-space: pre;
        padding: 1em;
      }
      #wrapperlicious dl, #wrapperlicious ol, #wrapperlicious ul {
        margin-bottom: 1em;
        margin-top: 1em;
      }
      #wrapperlicious ul {
        list-style-type: square;
      }
      #wrapperlicious ul ul {
        margin-bottom: 0px;
        margin-top: 0px;
      }
      #footer {
        font-size: 0.8em;
        padding-top: 0.5em;
        text-align: center;
      }
      #more {
        display: inline;
        font-size: 0.8em;
      }
      #perldocdiv {
        background-color: #fff;
        border: 1px solid #c1c1c1;
        border-bottom-left-radius: 5px;
        border-bottom-right-radius: 5px;
        margin-left: auto;
        margin-right: auto;
        padding: 3em;
        padding-top: 1em;
        max-width: 960px;
      }
      #moduleversion { float: right }
      #wrapperlicious .leading-notice {
        font-style: italic;
        padding-left: 1em;
        margin-top: 1em;
        margin-bottom: 1em;
      }
      #wrapperlicious .permalink {
        display: none;
        left: -0.75em;
        position: absolute;
        padding-right: 0.25em;
        text-decoration: none;
      }
      #wrapperlicious h1:hover .permalink, #wrapperlicious h2:hover .permalink,
      #wrapperlicious h3:hover .permalink, #wrapperlicious h4:hover .permalink,
      #wrapperlicious dt:hover .permalink {
        display: block;
      }
    </style>
    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=G-KVNWBNT5FB"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());

      gtag('config', 'G-KVNWBNT5FB');
      gtag('config', 'UA-50555-3');
    </script>
  </head>
  <body>
    <nav class="navbar navbar-expand-md navbar-dark bg-dark justify-content-between">
  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
    <span class="navbar-toggler-icon"></span>
  </button>
  <a class="navbar-brand" href="https://perldoc.perl.org/">Perldoc Browser</a>
  <div class="collapse navbar-collapse" id="navbarNav">
    <ul class="navbar-nav mr-auto">
      <li class="nav-item dropdown text-nowrap">
        <a class="nav-link dropdown-toggle" href="perl5100delta.html#" id="dropdownlink-stable" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">5.35.0</a>
        <div class="dropdown-menu" aria-labelledby="dropdownlink-stable">
          <a class="dropdown-item" href="https://perldoc.perl.org/perl5100delta">Latest</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.2/perl5100delta">5.38.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.1/perl5100delta">5.38.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.0/perl5100delta">5.38.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.36.3/perl5100delta">5.36.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.36.2/perl5100delta">5.36.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.36.1/perl5100delta">5.36.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.36.0/perl5100delta">5.36.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.34.3/perl5100delta">5.34.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.34.2/perl5100delta">5.34.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.34.1/perl5100delta">5.34.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.34.0/perl5100delta">5.34.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.32.1/perl5100delta">5.32.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.32.0/perl5100delta">5.32.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.30.3/perl5100delta">5.30.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.30.2/perl5100delta">5.30.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.30.1/perl5100delta">5.30.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.30.0/perl5100delta">5.30.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.28.3/perl5100delta">5.28.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.28.2/perl5100delta">5.28.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.28.1/perl5100delta">5.28.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.28.0/perl5100delta">5.28.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.26.3/perl5100delta">5.26.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.26.2/perl5100delta">5.26.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.26.1/perl5100delta">5.26.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.26.0/perl5100delta">5.26.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.4/perl5100delta">5.24.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.3/perl5100delta">5.24.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.2/perl5100delta">5.24.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.1/perl5100delta">5.24.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.0/perl5100delta">5.24.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.4/perl5100delta">5.22.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.3/perl5100delta">5.22.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.2/perl5100delta">5.22.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.1/perl5100delta">5.22.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.0/perl5100delta">5.22.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.20.3/perl5100delta">5.20.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.20.2/perl5100delta">5.20.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.20.1/perl5100delta">5.20.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.20.0/perl5100delta">5.20.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.4/perl5100delta">5.18.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.3/perl5100delta">5.18.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.2/perl5100delta">5.18.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.1/perl5100delta">5.18.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.0/perl5100delta">5.18.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.16.3/perl5100delta">5.16.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.16.2/perl5100delta">5.16.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.16.1/perl5100delta">5.16.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.16.0/perl5100delta">5.16.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.4/perl5100delta">5.14.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.3/perl5100delta">5.14.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.2/perl5100delta">5.14.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.1/perl5100delta">5.14.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.0/perl5100delta">5.14.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.5/perl5100delta">5.12.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.4/perl5100delta">5.12.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.3/perl5100delta">5.12.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.2/perl5100delta">5.12.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.1/perl5100delta">5.12.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.0/perl5100delta">5.12.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.10.1/perl5100delta">5.10.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.10.0/perl5100delta">5.10.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.9/perl5100delta">5.8.9</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.8/perl5100delta">5.8.8</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.7/perl5100delta">5.8.7</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.6/perl5100delta">5.8.6</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.5/perl5100delta">5.8.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.4/perl5100delta">5.8.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.3/perl5100delta">5.8.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.2/perl5100delta">5.8.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.1/perl5100delta">5.8.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.0/perl5100delta">5.8.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.6.2/perl5100delta">5.6.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.6.1/perl5100delta">5.6.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.6.0/perl5100delta">5.6.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005_04/perl5100delta">5.005_04</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005_03/perl5100delta">5.005_03</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005_02/perl5100delta">5.005_02</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005_01/perl5100delta">5.005_01</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005/perl5100delta">5.005</a>
        </div>
      </li>
      <li class="nav-item dropdown text-nowrap">
        <a class="nav-link dropdown-toggle" href="perl5100delta.html#" id="dropdownlink-dev" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dev</a>
        <div class="dropdown-menu" aria-labelledby="dropdownlink-dev">
          <a class="dropdown-item" href="https://perldoc.perl.org/blead/perl5100delta">blead</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.6/perl5100delta">5.39.6</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.5/perl5100delta">5.39.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.4/perl5100delta">5.39.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.3/perl5100delta">5.39.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.2/perl5100delta">5.39.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.1/perl5100delta">5.39.1</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.0-RC2/perl5100delta">5.38.0-RC2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.0-RC1/perl5100delta">5.38.0-RC1</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.11/perl5100delta">5.37.11</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.10/perl5100delta">5.37.10</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.9/perl5100delta">5.37.9</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.8/perl5100delta">5.37.8</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.7/perl5100delta">5.37.7</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.6/perl5100delta">5.37.6</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.5/perl5100delta">5.37.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.4/perl5100delta">5.37.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.3/perl5100delta">5.37.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.2/perl5100delta">5.37.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.1/perl5100delta">5.37.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.0/perl5100delta">5.37.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.11/perl5100delta">5.35.11</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.10/perl5100delta">5.35.10</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.9/perl5100delta">5.35.9</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.8/perl5100delta">5.35.8</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.7/perl5100delta">5.35.7</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.6/perl5100delta">5.35.6</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.5/perl5100delta">5.35.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.4/perl5100delta">5.35.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.3/perl5100delta">5.35.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.2/perl5100delta">5.35.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.1/perl5100delta">5.35.1</a>
          <a class="dropdown-item active" href="perl5100delta.html">5.35.0</a>
        </div>
      </li>
      <li class="nav-item dropdown text-nowrap">
        <a class="nav-link dropdown-toggle" href="perl5100delta.html#" id="dropdownlink-nav" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Documentation</a>
        <div class="dropdown-menu" aria-labelledby="dropdownlink-nav">
          <a class="dropdown-item" href="perl.html">Perl</a>
          <a class="dropdown-item" href="perlintro.html">Intro</a>
          <a class="dropdown-item" href="perl.html#Tutorials">Tutorials</a>
          <a class="dropdown-item" href="perlfaq.html">FAQs</a>
          <a class="dropdown-item" href="perl.html#Reference-Manual">Reference</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="perlop.html">Operators</a>
          <a class="dropdown-item" href="functions.html">Functions</a>
          <a class="dropdown-item" href="variables.html">Variables</a>
          <a class="dropdown-item" href="modules.html">Modules</a>
          <a class="dropdown-item" href="perlutil.html">Utilities</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="perlcommunity.html">Community</a>
          <a class="dropdown-item" href="perlhist.html">History</a>
        </div>
      </li>
    </ul>
    <ul class="navbar-nav">
      <script>
        function set_expand (expand) {
          var perldocdiv = document.getElementById('perldocdiv');
          var width = window.getComputedStyle(perldocdiv).getPropertyValue('max-width');
          var expanded = (width == '' || width == 'none') ? true : false;
          if (expand === null) {
            expand = !expanded;
          }
          if ((expand && !expanded) || (!expand && expanded)) {
            perldocdiv.style.setProperty('max-width', expand ? 'none' : '960px');
            var button_classlist = document.getElementById('content-expand-button').classList;
            if (expand) {
              button_classlist.add('btn-light');
              button_classlist.remove('btn-outline-light');
            } else {
              button_classlist.add('btn-outline-light');
              button_classlist.remove('btn-light');
            }
          }
          return expand;
        }
        function toggle_expand () {
          var expand = set_expand(null);
          document.cookie = 'perldoc_expand=' + (expand ? 1 : 0) + '; path=/; expires=Tue, 19 Jan 2038 03:14:07 UTC';
        }
        function read_expand () {
          return document.cookie.split(';').some(function (item) { return item.indexOf('perldoc_expand=1') >= 0 });
        }
        if (document.readyState === 'loading') {
          document.addEventListener('DOMContentLoaded', function () {
            if (read_expand()) {
              set_expand(true);
            }
          });
        } else if (read_expand()) {
          set_expand(true);
        }
      </script>
      <button id="content-expand-button" type="button" class="btn btn-outline-light d-none d-lg-inline-block mr-2" onclick="toggle_expand()">Expand</button>
    <ul>
    <form class="form-inline" method="get" action="https://perldoc.perl.org/5.35.0/search">
      <input class="form-control mr-3" type="search" name="q" placeholder="Search" aria-label="Search">
    </form>
  </div>
</nav>

    <div id="wrapperlicious" class="container-fluid">
      <div id="perldocdiv">
        <div id="links">
          <a href="perl5100delta.html">perl5100delta</a>
          <div id="more">
            (<a href="perl5100delta.txt">source</a>,
            <a href="https://metacpan.org/pod/perl5100delta">CPAN</a>)
          </div>
        </div>
        <div class="leading-notice">
          You are viewing the version of this documentation from Perl 5.35.0.
            This is a development version of Perl.
        </div>
        <h1><a id="toc">CONTENTS</a></h1>
                  <ul>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#NAME">NAME</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#DESCRIPTION">DESCRIPTION</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Core-Enhancements">Core Enhancements</a>
                            <ul>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#The-feature-pragma">The feature pragma</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#New-E-command-line-switch">New -E command-line switch</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Defined-or-operator">Defined-or operator</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Switch-and-Smart-Match-operator">Switch and Smart Match operator</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Regular-expressions">Regular expressions</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#say()">say()</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Lexical-$_">Lexical $_</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#The-_-prototype">The _ prototype</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#UNITCHECK-blocks">UNITCHECK blocks</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#New-Pragma,-mro">New Pragma, mro</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#readdir()-may-return-a-%22short-filename%22-on-Windows">readdir() may return a &quot;short filename&quot; on Windows</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#readpipe()-is-now-overridable">readpipe() is now overridable</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Default-argument-for-readline()">Default argument for readline()</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#state()-variables">state() variables</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Stacked-filetest-operators">Stacked filetest operators</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#UNIVERSAL::DOES()">UNIVERSAL::DOES()</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Formats">Formats</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Byte-order-modifiers-for-pack()-and-unpack()">Byte-order modifiers for pack() and unpack()</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#no-VERSION">no VERSION</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#chdir,-chmod-and-chown-on-filehandles">chdir, chmod and chown on filehandles</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#OS-groups">OS groups</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Recursive-sort-subs">Recursive sort subs</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Exceptions-in-constant-folding">Exceptions in constant folding</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Source-filters-in-@INC">Source filters in @INC</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#New-internal-variables">New internal variables</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Miscellaneous">Miscellaneous</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#UCD-5.0.0">UCD 5.0.0</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#MAD">MAD</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#kill()-on-Windows">kill() on Windows</a>
              </li>
          </ul>

              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Incompatible-Changes">Incompatible Changes</a>
                            <ul>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Packing-and-UTF-8-strings">Packing and UTF-8 strings</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Byte/character-count-feature-in-unpack()">Byte/character count feature in unpack()</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#The-$*-and-$%23-variables-have-been-removed">The $* and $# variables have been removed</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#substr()-lvalues-are-no-longer-fixed-length">substr() lvalues are no longer fixed-length</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Parsing-of-f-_">Parsing of -f _</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#:unique">:unique</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Effect-of-pragmas-in-eval">Effect of pragmas in eval</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#chdir-FOO">chdir FOO</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Handling-of-.pmc-files">Handling of .pmc files</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#$%5EV-is-now-a-version-object-instead-of-a-v-string">$^V is now a version object instead of a v-string</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#@-and-@+-in-patterns">@- and @+ in patterns</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#$AUTOLOAD-can-now-be-tainted">$AUTOLOAD can now be tainted</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Tainting-and-printf">Tainting and printf</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#undef-and-signal-handlers">undef and signal handlers</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#strictures-and-dereferencing-in-defined()">strictures and dereferencing in defined()</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#(?p%7B%7D)-has-been-removed">(?p{}) has been removed</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Pseudo-hashes-have-been-removed">Pseudo-hashes have been removed</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Removal-of-the-bytecode-compiler-and-of-perlcc">Removal of the bytecode compiler and of perlcc</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Removal-of-the-JPL">Removal of the JPL</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Recursive-inheritance-detected-earlier">Recursive inheritance detected earlier</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#warnings::enabled-and-warnings::warnif-changed-to-favor-users-of-modules">warnings::enabled and warnings::warnif changed to favor users of modules</a>
              </li>
          </ul>

              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Modules-and-Pragmata">Modules and Pragmata</a>
                            <ul>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Upgrading-individual-core-modules">Upgrading individual core modules</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Pragmata-Changes">Pragmata Changes</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#New-modules">New modules</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Selected-Changes-to-Core-Modules">Selected Changes to Core Modules</a>
              </li>
          </ul>

              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Utility-Changes">Utility Changes</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#New-Documentation">New Documentation</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Performance-Enhancements">Performance Enhancements</a>
                            <ul>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#In-place-sorting">In-place sorting</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Lexical-array-access">Lexical array access</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#XS-assisted-SWASHGET">XS-assisted SWASHGET</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Constant-subroutines">Constant subroutines</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#PERL_DONT_CREATE_GVSV">PERL_DONT_CREATE_GVSV</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Weak-references-are-cheaper">Weak references are cheaper</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#sort()-enhancements">sort() enhancements</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Memory-optimisations">Memory optimisations</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#UTF-8-cache-optimisation">UTF-8 cache optimisation</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Sloppy-stat-on-Windows">Sloppy stat on Windows</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Regular-expressions-optimisations">Regular expressions optimisations</a>
              </li>
          </ul>

              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Installation-and-Configuration-Improvements">Installation and Configuration Improvements</a>
                            <ul>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Configuration-improvements">Configuration improvements</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Compilation-improvements">Compilation improvements</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Installation-improvements">Installation improvements</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#New-Or-Improved-Platforms">New Or Improved Platforms</a>
              </li>
          </ul>

              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Selected-Bug-Fixes">Selected Bug Fixes</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#New-or-Changed-Diagnostics">New or Changed Diagnostics</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Changed-Internals">Changed Internals</a>
                            <ul>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Reordering-of-SVt_*-constants">Reordering of SVt_* constants</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Elimination-of-SVt_PVBM">Elimination of SVt_PVBM</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#New-type-SVt_BIND">New type SVt_BIND</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Removal-of-CPP-symbols">Removal of CPP symbols</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Less-space-is-used-by-ops">Less space is used by ops</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#New-parser">New parser</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Use-of-const">Use of const</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Mathoms">Mathoms</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#AvFLAGS-has-been-removed">AvFLAGS has been removed</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#av_*-changes">av_* changes</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#$%5EH-and-%25%5EH">$^H and %^H</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#B::-modules-inheritance-changed">B:: modules inheritance changed</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Anonymous-hash-and-array-constructors">Anonymous hash and array constructors</a>
              </li>
          </ul>

              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Known-Problems">Known Problems</a>
                            <ul>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#UTF-8-problems">UTF-8 problems</a>
              </li>
          </ul>

              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Platform-Specific-Problems">Platform Specific Problems</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#Reporting-Bugs">Reporting Bugs</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perl5100delta.html#SEE-ALSO">SEE ALSO</a>
              </li>
          </ul>

      <h1 id="NAME"><a class="permalink" href="perl5100delta.html#NAME">#</a>NAME</h1>

<p>perl5100delta - what is new for perl 5.10.0</p>

<h1 id="DESCRIPTION"><a class="permalink" href="perl5100delta.html#DESCRIPTION">#</a>DESCRIPTION</h1>

<p>This document describes the differences between the 5.8.8 release and the 5.10.0 release.</p>

<p>Many of the bug fixes in 5.10.0 were already seen in the 5.8.X maintenance releases; they are not duplicated here and are documented in the set of man pages named perl58[1-8]?delta.</p>

<h1 id="Core-Enhancements"><a class="permalink" href="perl5100delta.html#Core-Enhancements">#</a><a id="Core"></a>Core Enhancements</h1>

<h2 id="The-feature-pragma"><a class="permalink" href="perl5100delta.html#The-feature-pragma">#</a><a id="The"></a>The <code>feature</code> pragma</h2>

<p>The <code>feature</code> pragma is used to enable new syntax that would break Perl&#39;s backwards-compatibility with older releases of the language. It&#39;s a lexical pragma, like <code>strict</code> or <code>warnings</code>.</p>

<p>Currently the following new features are available: <code>switch</code> (adds a switch statement), <code>say</code> (adds a <code>say</code> built-in function), and <code>state</code> (adds a <code>state</code> keyword for declaring &quot;static&quot; variables). Those features are described in their own sections of this document.</p>

<p>The <code>feature</code> pragma is also implicitly loaded when you require a minimal perl version (with the <code>use VERSION</code> construct) greater than, or equal to, 5.9.5. See <a href="feature.html">feature</a> for details.</p>

<h2 id="New-E-command-line-switch"><a class="permalink" href="perl5100delta.html#New-E-command-line-switch">#</a><a id="New"></a><a id="New--E-command-line-switch"></a>New <b>-E</b> command-line switch</h2>

<p><b>-E</b> is equivalent to <b>-e</b>, but it implicitly enables all optional features (like <code>use feature &quot;:5.10&quot;</code>).</p>

<h2 id="Defined-or-operator"><a class="permalink" href="perl5100delta.html#Defined-or-operator">#</a><a id="Defined"></a>Defined-or operator</h2>

<p>A new operator <code>//</code> (defined-or) has been implemented. The following expression:</p>

<pre><code>$a // $b</code></pre>

<p>is merely equivalent to</p>

<pre><code>defined $a ? $a : $b</code></pre>

<p>and the statement</p>

<pre><code>$c //= $d;</code></pre>

<p>can now be used instead of</p>

<pre><code>$c = $d unless defined $c;</code></pre>

<p>The <code>//</code> operator has the same precedence and associativity as <code>||</code>. Special care has been taken to ensure that this operator Do What You Mean while not breaking old code, but some edge cases involving the empty regular expression may now parse differently. See <a href="perlop.html">perlop</a> for details.</p>

<h2 id="Switch-and-Smart-Match-operator"><a class="permalink" href="perl5100delta.html#Switch-and-Smart-Match-operator">#</a><a id="Switch"></a>Switch and Smart Match operator</h2>

<p>Perl 5 now has a switch statement. It&#39;s available when <code>use feature &#39;switch&#39;</code> is in effect. This feature introduces three new keywords, <code>given</code>, <code>when</code>, and <code>default</code>:</p>

<pre><code>    given ($foo) {
	when (/^abc/) { $abc = 1; }
	when (/^def/) { $def = 1; }
	when (/^xyz/) { $xyz = 1; }
	default { $nothing = 1; }
    }</code></pre>

<p>A more complete description of how Perl matches the switch variable against the <code>when</code> conditions is given in <a href="perlsyn.html#Switch-statements">&quot;Switch statements&quot; in perlsyn</a>.</p>

<p>This kind of match is called <i>smart match</i>, and it&#39;s also possible to use it outside of switch statements, via the new <code>~~</code> operator. See <a href="perlsyn.html#Smart-matching-in-detail">&quot;Smart matching in detail&quot; in perlsyn</a>.</p>

<p>This feature was contributed by Robin Houston.</p>

<h2 id="Regular-expressions"><a class="permalink" href="perl5100delta.html#Regular-expressions">#</a><a id="Regular"></a>Regular expressions</h2>

<dl>

<dt id="Recursive-Patterns"><a class="permalink" href="perl5100delta.html#Recursive-Patterns">#</a><a id="Recursive"></a>Recursive Patterns</dt>
<dd>

<p>It is now possible to write recursive patterns without using the <code>(??{})</code> construct. This new way is more efficient, and in many cases easier to read.</p>

<p>Each capturing parenthesis can now be treated as an independent pattern that can be entered by using the <code>(?PARNO)</code> syntax (<code>PARNO</code> standing for &quot;parenthesis number&quot;). For example, the following pattern will match nested balanced angle brackets:</p>

<pre><code class="plaintext">    /
     ^                      # start of line
     (                      # start capture buffer 1
	&lt;                   #   match an opening angle bracket
	(?:                 #   match one of:
	    (?&gt;             #     don&#39;t backtrack over the inside of this group
	        [^&lt;&gt;]+      #       one or more non angle brackets
	    )               #     end non backtracking group
	|                   #     ... or ...
	    (?1)            #     recurse to bracket 1 and try it again
	)*                  #   0 or more times.
	&gt;                   #   match a closing angle bracket
     )                      # end capture buffer one
     $                      # end of line
    /x</code></pre>

<p>PCRE users should note that Perl&#39;s recursive regex feature allows backtracking into a recursed pattern, whereas in PCRE the recursion is atomic or &quot;possessive&quot; in nature. As in the example above, you can add (?&gt;) to control this selectively. (Yves Orton)</p>

</dd>
<dt id="Named-Capture-Buffers"><a class="permalink" href="perl5100delta.html#Named-Capture-Buffers">#</a><a id="Named"></a>Named Capture Buffers</dt>
<dd>

<p>It is now possible to name capturing parenthesis in a pattern and refer to the captured contents by name. The naming syntax is <code>(?&lt;NAME&gt;....)</code>. It&#39;s possible to backreference to a named buffer with the <code>\k&lt;NAME&gt;</code> syntax. In code, the new magical hashes <code>%+</code> and <code>%-</code> can be used to access the contents of the capture buffers.</p>

<p>Thus, to replace all doubled chars with a single copy, one could write</p>

<pre><code class="plaintext">s/(?&lt;letter&gt;.)\k&lt;letter&gt;/$+{letter}/g</code></pre>

<p>Only buffers with defined contents will be &quot;visible&quot; in the <code>%+</code> hash, so it&#39;s possible to do something like</p>

<pre><code>foreach my $name (keys %+) {
    print &quot;content of buffer &#39;$name&#39; is $+{$name}\n&quot;;
}</code></pre>

<p>The <code>%-</code> hash is a bit more complete, since it will contain array refs holding values from all capture buffers similarly named, if there should be many of them.</p>

<p><code>%+</code> and <code>%-</code> are implemented as tied hashes through the new module <code>Tie::Hash::NamedCapture</code>.</p>

<p>Users exposed to the .NET regex engine will find that the perl implementation differs in that the numerical ordering of the buffers is sequential, and not &quot;unnamed first, then named&quot;. Thus in the pattern</p>

<pre><code class="plaintext">/(A)(?&lt;B&gt;B)(C)(?&lt;D&gt;D)/</code></pre>

<p>$1 will be &#39;A&#39;, $2 will be &#39;B&#39;, $3 will be &#39;C&#39; and $4 will be &#39;D&#39; and not $1 is &#39;A&#39;, $2 is &#39;C&#39; and $3 is &#39;B&#39; and $4 is &#39;D&#39; that a .NET programmer would expect. This is considered a feature. :-) (Yves Orton)</p>

</dd>
<dt id="Possessive-Quantifiers"><a class="permalink" href="perl5100delta.html#Possessive-Quantifiers">#</a><a id="Possessive"></a>Possessive Quantifiers</dt>
<dd>

<p>Perl now supports the &quot;possessive quantifier&quot; syntax of the &quot;atomic match&quot; pattern. Basically a possessive quantifier matches as much as it can and never gives any back. Thus it can be used to control backtracking. The syntax is similar to non-greedy matching, except instead of using a &#39;?&#39; as the modifier the &#39;+&#39; is used. Thus <code>?+</code>, <code>*+</code>, <code>++</code>, <code>{min,max}+</code> are now legal quantifiers. (Yves Orton)</p>

</dd>
<dt id="Backtracking-control-verbs"><a class="permalink" href="perl5100delta.html#Backtracking-control-verbs">#</a><a id="Backtracking"></a>Backtracking control verbs</dt>
<dd>

<p>The regex engine now supports a number of special-purpose backtrack control verbs: (*THEN), (*PRUNE), (*MARK), (*SKIP), (*COMMIT), (*FAIL) and (*ACCEPT). See <a href="perlre.html">perlre</a> for their descriptions. (Yves Orton)</p>

</dd>
<dt id="Relative-backreferences"><a class="permalink" href="perl5100delta.html#Relative-backreferences">#</a><a id="Relative"></a>Relative backreferences</dt>
<dd>

<p>A new syntax <code>\g{N}</code> or <code>\gN</code> where &quot;N&quot; is a decimal integer allows a safer form of back-reference notation as well as allowing relative backreferences. This should make it easier to generate and embed patterns that contain backreferences. See <a href="perlre.html#Capture-buffers">&quot;Capture buffers&quot; in perlre</a>. (Yves Orton)</p>

</dd>
<dt id="\K-escape"><a class="permalink" href="perl5100delta.html#%5CK-escape">#</a><a id="K-escape"></a><code>\K</code> escape</dt>
<dd>

<p>The functionality of Jeff Pinyan&#39;s module Regexp::Keep has been added to the core. In regular expressions you can now use the special escape <code>\K</code> as a way to do something like floating length positive lookbehind. It is also useful in substitutions like:</p>

<pre><code>s/(foo)bar/$1/g</code></pre>

<p>that can now be converted to</p>

<pre><code class="plaintext">s/foo\Kbar//g</code></pre>

<p>which is much more efficient. (Yves Orton)</p>

</dd>
<dt id="Vertical-and-horizontal-whitespace,-and-linebreak"><a class="permalink" href="perl5100delta.html#Vertical-and-horizontal-whitespace,-and-linebreak">#</a><a id="Vertical"></a><a id="Vertical-and-horizontal-whitespace-and-linebreak"></a>Vertical and horizontal whitespace, and linebreak</dt>
<dd>

<p>Regular expressions now recognize the <code>\v</code> and <code>\h</code> escapes that match vertical and horizontal whitespace, respectively. <code>\V</code> and <code>\H</code> logically match their complements.</p>

<p><code>\R</code> matches a generic linebreak, that is, vertical whitespace, plus the multi-character sequence <code>&quot;\x0D\x0A&quot;</code>.</p>

</dd>
<dt id="Optional-pre-match-and-post-match-captures-with-the-/p-flag"><a class="permalink" href="perl5100delta.html#Optional-pre-match-and-post-match-captures-with-the-/p-flag">#</a><a id="Optional"></a><a id="Optional-pre-match-and-post-match-captures-with-the-p-flag"></a>Optional pre-match and post-match captures with the /p flag</dt>
<dd>

<p>There is a new flag <code>/p</code> for regular expressions. Using this makes the engine preserve a copy of the part of the matched string before the matching substring to the new special variable <code>${^PREMATCH}</code>, the part after the matching substring to <code>${^POSTMATCH}</code>, and the matched substring itself to <code>${^MATCH}</code>.</p>

<p>Perl is still able to store these substrings to the special variables <code>$`</code>, <code>$&#39;</code>, <code>$&amp;</code>, but using these variables anywhere in the program adds a penalty to all regular expression matches, whereas if you use the <code>/p</code> flag and the new special variables instead, you pay only for the regular expressions where the flag is used.</p>

<p>For more detail on the new variables, see <a href="perlvar.html">perlvar</a>; for the use of the regular expression flag, see <a href="perlop.html">perlop</a> and <a href="perlre.html">perlre</a>.</p>

</dd>
</dl>

<h2 id="say()"><a class="permalink" href="perl5100delta.html#say()">#</a><a id="say"></a><code>say()</code></h2>

<p>say() is a new built-in, only available when <code>use feature &#39;say&#39;</code> is in effect, that is similar to print(), but that implicitly appends a newline to the printed string. See <a href="perlfunc.html#say">&quot;say&quot; in perlfunc</a>. (Robin Houston)</p>

<h2 id="Lexical-$_"><a class="permalink" href="perl5100delta.html#Lexical-$_">#</a><a id="Lexical"></a><a id="Lexical-_"></a>Lexical <code>$_</code></h2>

<p>The default variable <code>$_</code> can now be lexicalized, by declaring it like any other lexical variable, with a simple</p>

<pre><code>my $_;</code></pre>

<p>The operations that default on <code>$_</code> will use the lexically-scoped version of <code>$_</code> when it exists, instead of the global <code>$_</code>.</p>

<p>In a <code>map</code> or a <code>grep</code> block, if <code>$_</code> was previously my&#39;ed, then the <code>$_</code> inside the block is lexical as well (and scoped to the block).</p>

<p>In a scope where <code>$_</code> has been lexicalized, you can still have access to the global version of <code>$_</code> by using <code>$::_</code>, or, more simply, by overriding the lexical declaration with <code>our $_</code>. (Rafael Garcia-Suarez)</p>

<h2 id="The-_-prototype"><a class="permalink" href="perl5100delta.html#The-_-prototype">#</a><a id="The1"></a>The <code>_</code> prototype</h2>

<p>A new prototype character has been added. <code>_</code> is equivalent to <code>$</code> but defaults to <code>$_</code> if the corresponding argument isn&#39;t supplied (both <code>$</code> and <code>_</code> denote a scalar). Due to the optional nature of the argument, you can only use it at the end of a prototype, or before a semicolon.</p>

<p>This has a small incompatible consequence: the prototype() function has been adjusted to return <code>_</code> for some built-ins in appropriate cases (for example, <code>prototype(&#39;CORE::rmdir&#39;)</code>). (Rafael Garcia-Suarez)</p>

<h2 id="UNITCHECK-blocks"><a class="permalink" href="perl5100delta.html#UNITCHECK-blocks">#</a><a id="UNITCHECK"></a>UNITCHECK blocks</h2>

<p><code>UNITCHECK</code>, a new special code block has been introduced, in addition to <code>BEGIN</code>, <code>CHECK</code>, <code>INIT</code> and <code>END</code>.</p>

<p><code>CHECK</code> and <code>INIT</code> blocks, while useful for some specialized purposes, are always executed at the transition between the compilation and the execution of the main program, and thus are useless whenever code is loaded at runtime. On the other hand, <code>UNITCHECK</code> blocks are executed just after the unit which defined them has been compiled. See <a href="perlmod.html">perlmod</a> for more information. (Alex Gough)</p>

<h2 id="New-Pragma,-mro"><a class="permalink" href="perl5100delta.html#New-Pragma,-mro">#</a><a id="New1"></a><a id="New-Pragma-mro"></a>New Pragma, <code>mro</code></h2>

<p>A new pragma, <code>mro</code> (for Method Resolution Order) has been added. It permits to switch, on a per-class basis, the algorithm that perl uses to find inherited methods in case of a multiple inheritance hierarchy. The default MRO hasn&#39;t changed (DFS, for Depth First Search). Another MRO is available: the C3 algorithm. See <a href="mro.html">mro</a> for more information. (Brandon Black)</p>

<p>Note that, due to changes in the implementation of class hierarchy search, code that used to undef the <code>*ISA</code> glob will most probably break. Anyway, undef&#39;ing <code>*ISA</code> had the side-effect of removing the magic on the @ISA array and should not have been done in the first place. Also, the cache <code>*::ISA::CACHE::</code> no longer exists; to force reset the @ISA cache, you now need to use the <code>mro</code> API, or more simply to assign to @ISA (e.g. with <code>@ISA = @ISA</code>).</p>

<h2 id="readdir()-may-return-a-&quot;short-filename&quot;-on-Windows"><a class="permalink" href="perl5100delta.html#readdir()-may-return-a-%22short-filename%22-on-Windows">#</a><a id="readdir"></a><a id="readdir-may-return-a-short-filename-on-Windows"></a>readdir() may return a &quot;short filename&quot; on Windows</h2>

<p>The readdir() function may return a &quot;short filename&quot; when the long filename contains characters outside the ANSI codepage. Similarly Cwd::cwd() may return a short directory name, and glob() may return short names as well. On the NTFS file system these short names can always be represented in the ANSI codepage. This will not be true for all other file system drivers; e.g. the FAT filesystem stores short filenames in the OEM codepage, so some files on FAT volumes remain inaccessible through the ANSI APIs.</p>

<p>Similarly, $^X, @INC, and $ENV{PATH} are preprocessed at startup to make sure all paths are valid in the ANSI codepage (if possible).</p>

<p>The Win32::GetLongPathName() function now returns the UTF-8 encoded correct long file name instead of using replacement characters to force the name into the ANSI codepage. The new Win32::GetANSIPathName() function can be used to turn a long pathname into a short one only if the long one cannot be represented in the ANSI codepage.</p>

<p>Many other functions in the <code>Win32</code> module have been improved to accept UTF-8 encoded arguments. Please see <a href="Win32.html">Win32</a> for details.</p>

<h2 id="readpipe()-is-now-overridable"><a class="permalink" href="perl5100delta.html#readpipe()-is-now-overridable">#</a><a id="readpipe"></a><a id="readpipe-is-now-overridable"></a>readpipe() is now overridable</h2>

<p>The built-in function readpipe() is now overridable. Overriding it permits also to override its operator counterpart, <code>qx//</code> (a.k.a. <code>``</code>). Moreover, it now defaults to <code>$_</code> if no argument is provided. (Rafael Garcia-Suarez)</p>

<h2 id="Default-argument-for-readline()"><a class="permalink" href="perl5100delta.html#Default-argument-for-readline()">#</a><a id="Default"></a><a id="Default-argument-for-readline"></a>Default argument for readline()</h2>

<p>readline() now defaults to <code>*ARGV</code> if no argument is provided. (Rafael Garcia-Suarez)</p>

<h2 id="state()-variables"><a class="permalink" href="perl5100delta.html#state()-variables">#</a><a id="state"></a><a id="state-variables"></a>state() variables</h2>

<p>A new class of variables has been introduced. State variables are similar to <code>my</code> variables, but are declared with the <code>state</code> keyword in place of <code>my</code>. They&#39;re visible only in their lexical scope, but their value is persistent: unlike <code>my</code> variables, they&#39;re not undefined at scope entry, but retain their previous value. (Rafael Garcia-Suarez, Nicholas Clark)</p>

<p>To use state variables, one needs to enable them by using</p>

<pre><code>use feature &#39;state&#39;;</code></pre>

<p>or by using the <code>-E</code> command-line switch in one-liners. See <a href="perlsub.html#Persistent-Private-Variables">&quot;Persistent Private Variables&quot; in perlsub</a>.</p>

<h2 id="Stacked-filetest-operators"><a class="permalink" href="perl5100delta.html#Stacked-filetest-operators">#</a><a id="Stacked"></a>Stacked filetest operators</h2>

<p>As a new form of syntactic sugar, it&#39;s now possible to stack up filetest operators. You can now write <code>-f -w -x $file</code> in a row to mean <code>-x $file &amp;&amp; -w _ &amp;&amp; -f _</code>. See <a href="perlfunc.html#-X">&quot;-X&quot; in perlfunc</a>.</p>

<h2 id="UNIVERSAL::DOES()"><a class="permalink" href="perl5100delta.html#UNIVERSAL::DOES()">#</a><a id="UNIVERSAL"></a><a id="UNIVERSAL::DOES"></a>UNIVERSAL::DOES()</h2>

<p>The <code>UNIVERSAL</code> class has a new method, <code>DOES()</code>. It has been added to solve semantic problems with the <code>isa()</code> method. <code>isa()</code> checks for inheritance, while <code>DOES()</code> has been designed to be overridden when module authors use other types of relations between classes (in addition to inheritance). (chromatic)</p>

<p>See <a href="UNIVERSAL.html#%24obj-%3EDOES%28-ROLE-%29">&quot;$obj-&gt;DOES( ROLE )&quot; in UNIVERSAL</a>.</p>

<h2 id="Formats"><a class="permalink" href="perl5100delta.html#Formats">#</a>Formats</h2>

<p>Formats were improved in several ways. A new field, <code>^*</code>, can be used for variable-width, one-line-at-a-time text. Null characters are now handled correctly in picture lines. Using <code>@#</code> and <code>~~</code> together will now produce a compile-time error, as those format fields are incompatible. <a href="perlform.html">perlform</a> has been improved, and miscellaneous bugs fixed.</p>

<h2 id="Byte-order-modifiers-for-pack()-and-unpack()"><a class="permalink" href="perl5100delta.html#Byte-order-modifiers-for-pack()-and-unpack()">#</a><a id="Byte"></a><a id="Byte-order-modifiers-for-pack-and-unpack"></a>Byte-order modifiers for pack() and unpack()</h2>

<p>There are two new byte-order modifiers, <code>&gt;</code> (big-endian) and <code>&lt;</code> (little-endian), that can be appended to most pack() and unpack() template characters and groups to force a certain byte-order for that type or group. See <a href="perlfunc.html#pack">&quot;pack&quot; in perlfunc</a> and <a href="perlpacktut.html">perlpacktut</a> for details.</p>

<h2 id="no-VERSION"><a class="permalink" href="perl5100delta.html#no-VERSION">#</a><a id="no"></a><code>no VERSION</code></h2>

<p>You can now use <code>no</code> followed by a version number to specify that you want to use a version of perl older than the specified one.</p>

<h2 id="chdir,-chmod-and-chown-on-filehandles"><a class="permalink" href="perl5100delta.html#chdir,-chmod-and-chown-on-filehandles">#</a><a id="chdir"></a><a id="chdir-chmod-and-chown-on-filehandles"></a><code>chdir</code>, <code>chmod</code> and <code>chown</code> on filehandles</h2>

<p><code>chdir</code>, <code>chmod</code> and <code>chown</code> can now work on filehandles as well as filenames, if the system supports respectively <code>fchdir</code>, <code>fchmod</code> and <code>fchown</code>, thanks to a patch provided by Gisle Aas.</p>

<h2 id="OS-groups"><a class="permalink" href="perl5100delta.html#OS-groups">#</a><a id="OS"></a>OS groups</h2>

<p><code>$(</code> and <code>$)</code> now return groups in the order where the OS returns them, thanks to Gisle Aas. This wasn&#39;t previously the case.</p>

<h2 id="Recursive-sort-subs"><a class="permalink" href="perl5100delta.html#Recursive-sort-subs">#</a><a id="Recursive1"></a>Recursive sort subs</h2>

<p>You can now use recursive subroutines with sort(), thanks to Robin Houston.</p>

<h2 id="Exceptions-in-constant-folding"><a class="permalink" href="perl5100delta.html#Exceptions-in-constant-folding">#</a><a id="Exceptions"></a>Exceptions in constant folding</h2>

<p>The constant folding routine is now wrapped in an exception handler, and if folding throws an exception (such as attempting to evaluate 0/0), perl now retains the current optree, rather than aborting the whole program. Without this change, programs would not compile if they had expressions that happened to generate exceptions, even though those expressions were in code that could never be reached at runtime. (Nicholas Clark, Dave Mitchell)</p>

<h2 id="Source-filters-in-@INC"><a class="permalink" href="perl5100delta.html#Source-filters-in-@INC">#</a><a id="Source"></a><a id="Source-filters-in-INC"></a>Source filters in @INC</h2>

<p>It&#39;s possible to enhance the mechanism of subroutine hooks in @INC by adding a source filter on top of the filehandle opened and returned by the hook. This feature was planned a long time ago, but wasn&#39;t quite working until now. See <a href="perlfunc.html#require">&quot;require&quot; in perlfunc</a> for details. (Nicholas Clark)</p>

<h2 id="New-internal-variables"><a class="permalink" href="perl5100delta.html#New-internal-variables">#</a><a id="New2"></a>New internal variables</h2>

<dl>

<dt id="${^RE_DEBUG_FLAGS}"><a class="permalink" href="perl5100delta.html#$%7B%5ERE_DEBUG_FLAGS%7D">#</a><a id="RE_DEBUG_FLAGS"></a><code>${^RE_DEBUG_FLAGS}</code></dt>
<dd>

<p>This variable controls what debug flags are in effect for the regular expression engine when running under <code>use re &quot;debug&quot;</code>. See <a href="re.html">re</a> for details.</p>

</dd>
<dt id="${^CHILD_ERROR_NATIVE}"><a class="permalink" href="perl5100delta.html#$%7B%5ECHILD_ERROR_NATIVE%7D">#</a><a id="CHILD_ERROR_NATIVE"></a><code>${^CHILD_ERROR_NATIVE}</code></dt>
<dd>

<p>This variable gives the native status returned by the last pipe close, backtick command, successful call to wait() or waitpid(), or from the system() operator. See <a href="perlvar.html">perlvar</a> for details. (Contributed by Gisle Aas.)</p>

</dd>
<dt id="${^RE_TRIE_MAXBUF}"><a class="permalink" href="perl5100delta.html#$%7B%5ERE_TRIE_MAXBUF%7D">#</a><a id="RE_TRIE_MAXBUF"></a><code>${^RE_TRIE_MAXBUF}</code></dt>
<dd>

<p>See <a href="perl5100delta.html#Trie-optimisation-of-literal-string-alternations">&quot;Trie optimisation of literal string alternations&quot;</a>.</p>

</dd>
<dt id="${^WIN32_SLOPPY_STAT}"><a class="permalink" href="perl5100delta.html#$%7B%5EWIN32_SLOPPY_STAT%7D">#</a><a id="WIN32_SLOPPY_STAT"></a><code>${^WIN32_SLOPPY_STAT}</code></dt>
<dd>

<p>See <a href="perl5100delta.html#Sloppy-stat-on-Windows">&quot;Sloppy stat on Windows&quot;</a>.</p>

</dd>
</dl>

<h2 id="Miscellaneous"><a class="permalink" href="perl5100delta.html#Miscellaneous">#</a>Miscellaneous</h2>

<p><code>unpack()</code> now defaults to unpacking the <code>$_</code> variable.</p>

<p><code>mkdir()</code> without arguments now defaults to <code>$_</code>.</p>

<p>The internal dump output has been improved, so that non-printable characters such as newline and backspace are output in <code>\x</code> notation, rather than octal.</p>

<p>The <b>-C</b> option can no longer be used on the <code>#!</code> line. It wasn&#39;t working there anyway, since the standard streams are already set up at this point in the execution of the perl interpreter. You can use binmode() instead to get the desired behaviour.</p>

<h2 id="UCD-5.0.0"><a class="permalink" href="perl5100delta.html#UCD-5.0.0">#</a><a id="UCD"></a>UCD 5.0.0</h2>

<p>The copy of the Unicode Character Database included in Perl 5 has been updated to version 5.0.0.</p>

<h2 id="MAD"><a class="permalink" href="perl5100delta.html#MAD">#</a>MAD</h2>

<p>MAD, which stands for <i>Miscellaneous Attribute Decoration</i>, is a still-in-development work leading to a Perl 5 to Perl 6 converter. To enable it, it&#39;s necessary to pass the argument <code>-Dmad</code> to Configure. The obtained perl isn&#39;t binary compatible with a regular perl 5.10, and has space and speed penalties; moreover not all regression tests still pass with it. (Larry Wall, Nicholas Clark)</p>

<h2 id="kill()-on-Windows"><a class="permalink" href="perl5100delta.html#kill()-on-Windows">#</a><a id="kill"></a><a id="kill-on-Windows"></a>kill() on Windows</h2>

<p>On Windows platforms, <code>kill(-9, $pid)</code> now kills a process tree. (On Unix, this delivers the signal to all processes in the same process group.)</p>

<h1 id="Incompatible-Changes"><a class="permalink" href="perl5100delta.html#Incompatible-Changes">#</a><a id="Incompatible"></a>Incompatible Changes</h1>

<h2 id="Packing-and-UTF-8-strings"><a class="permalink" href="perl5100delta.html#Packing-and-UTF-8-strings">#</a><a id="Packing"></a>Packing and UTF-8 strings</h2>

<p>The semantics of pack() and unpack() regarding UTF-8-encoded data has been changed. Processing is now by default character per character instead of byte per byte on the underlying encoding. Notably, code that used things like <code>pack(&quot;a*&quot;, $string)</code> to see through the encoding of string will now simply get back the original $string. Packed strings can also get upgraded during processing when you store upgraded characters. You can get the old behaviour by using <code>use bytes</code>.</p>

<p>To be consistent with pack(), the <code>C0</code> in unpack() templates indicates that the data is to be processed in character mode, i.e. character by character; on the contrary, <code>U0</code> in unpack() indicates UTF-8 mode, where the packed string is processed in its UTF-8-encoded Unicode form on a byte by byte basis. This is reversed with regard to perl 5.8.X, but now consistent between pack() and unpack().</p>

<p>Moreover, <code>C0</code> and <code>U0</code> can also be used in pack() templates to specify respectively character and byte modes.</p>

<p><code>C0</code> and <code>U0</code> in the middle of a pack or unpack format now switch to the specified encoding mode, honoring parens grouping. Previously, parens were ignored.</p>

<p>Also, there is a new pack() character format, <code>W</code>, which is intended to replace the old <code>C</code>. <code>C</code> is kept for unsigned chars coded as bytes in the strings internal representation. <code>W</code> represents unsigned (logical) character values, which can be greater than 255. It is therefore more robust when dealing with potentially UTF-8-encoded data (as <code>C</code> will wrap values outside the range 0..255, and not respect the string encoding).</p>

<p>In practice, that means that pack formats are now encoding-neutral, except <code>C</code>.</p>

<p>For consistency, <code>A</code> in unpack() format now trims all Unicode whitespace from the end of the string. Before perl 5.9.2, it used to strip only the classical ASCII space characters.</p>

<h2 id="Byte/character-count-feature-in-unpack()"><a class="permalink" href="perl5100delta.html#Byte/character-count-feature-in-unpack()">#</a><a id="Byte1"></a><a id="Byte-character-count-feature-in-unpack"></a>Byte/character count feature in unpack()</h2>

<p>A new unpack() template character, <code>&quot;.&quot;</code>, returns the number of bytes or characters (depending on the selected encoding mode, see above) read so far.</p>

<h2 id="The-$*-and-$#-variables-have-been-removed"><a class="permalink" href="perl5100delta.html#The-$*-and-$%23-variables-have-been-removed">#</a><a id="The2"></a><a id="The-and-variables-have-been-removed"></a>The <code>$*</code> and <code>$#</code> variables have been removed</h2>

<p><code>$*</code>, which was deprecated in favor of the <code>/s</code> and <code>/m</code> regexp modifiers, has been removed.</p>

<p>The deprecated <code>$#</code> variable (output format for numbers) has been removed.</p>

<p>Two new severe warnings, <code>$#/$* is no longer supported</code>, have been added.</p>

<h2 id="substr()-lvalues-are-no-longer-fixed-length"><a class="permalink" href="perl5100delta.html#substr()-lvalues-are-no-longer-fixed-length">#</a><a id="substr"></a><a id="substr-lvalues-are-no-longer-fixed-length"></a>substr() lvalues are no longer fixed-length</h2>

<p>The lvalues returned by the three argument form of substr() used to be a &quot;fixed length window&quot; on the original string. In some cases this could cause surprising action at distance or other undefined behaviour. Now the length of the window adjusts itself to the length of the string assigned to it.</p>

<h2 id="Parsing-of-f-_"><a class="permalink" href="perl5100delta.html#Parsing-of-f-_">#</a><a id="Parsing"></a><a id="Parsing-of--f-_"></a>Parsing of <code>-f _</code></h2>

<p>The identifier <code>_</code> is now forced to be a bareword after a filetest operator. This solves a number of misparsing issues when a global <code>_</code> subroutine is defined.</p>

<h2 id=":unique"><a class="permalink" href="perl5100delta.html#:unique">#</a><a id="unique"></a><code>:unique</code></h2>

<p>The <code>:unique</code> attribute has been made a no-op, since its current implementation was fundamentally flawed and not threadsafe.</p>

<h2 id="Effect-of-pragmas-in-eval"><a class="permalink" href="perl5100delta.html#Effect-of-pragmas-in-eval">#</a><a id="Effect"></a>Effect of pragmas in eval</h2>

<p>The compile-time value of the <code>%^H</code> hint variable can now propagate into eval(&quot;&quot;)uated code. This makes it more useful to implement lexical pragmas.</p>

<p>As a side-effect of this, the overloaded-ness of constants now propagates into eval(&quot;&quot;).</p>

<h2 id="chdir-FOO"><a class="permalink" href="perl5100delta.html#chdir-FOO">#</a><a id="chdir1"></a>chdir FOO</h2>

<p>A bareword argument to chdir() is now recognized as a file handle. Earlier releases interpreted the bareword as a directory name. (Gisle Aas)</p>

<h2 id="Handling-of-.pmc-files"><a class="permalink" href="perl5100delta.html#Handling-of-.pmc-files">#</a><a id="Handling"></a>Handling of .pmc files</h2>

<p>An old feature of perl was that before <code>require</code> or <code>use</code> look for a file with a <i>.pm</i> extension, they will first look for a similar filename with a <i>.pmc</i> extension. If this file is found, it will be loaded in place of any potentially existing file ending in a <i>.pm</i> extension.</p>

<p>Previously, <i>.pmc</i> files were loaded only if more recent than the matching <i>.pm</i> file. Starting with 5.9.4, they&#39;ll be always loaded if they exist.</p>

<h2 id="$^V-is-now-a-version-object-instead-of-a-v-string"><a class="permalink" href="perl5100delta.html#$%5EV-is-now-a-version-object-instead-of-a-v-string">#</a><a id="V-is-now-a-version-object-instead-of-a-v-string"></a>$^V is now a <code>version</code> object instead of a v-string</h2>

<p>$^V can still be used with the <code>%vd</code> format in printf, but any character-level operations will now access the string representation of the <code>version</code> object and not the ordinals of a v-string. Expressions like <code>substr($^V, 0, 2)</code> or <code>split //, $^V</code> no longer work and must be rewritten.</p>

<h2 id="@-and-@+-in-patterns"><a class="permalink" href="perl5100delta.html#@-and-@+-in-patterns">#</a><a id="and-in-patterns"></a>@- and @+ in patterns</h2>

<p>The special arrays <code>@-</code> and <code>@+</code> are no longer interpolated in regular expressions. (Sadahiro Tomoyuki)</p>

<h2 id="$AUTOLOAD-can-now-be-tainted"><a class="permalink" href="perl5100delta.html#$AUTOLOAD-can-now-be-tainted">#</a><a id="AUTOLOAD-can-now-be-tainted"></a>$AUTOLOAD can now be tainted</h2>

<p>If you call a subroutine by a tainted name, and if it defers to an AUTOLOAD function, then $AUTOLOAD will be (correctly) tainted. (Rick Delaney)</p>

<h2 id="Tainting-and-printf"><a class="permalink" href="perl5100delta.html#Tainting-and-printf">#</a><a id="Tainting"></a>Tainting and printf</h2>

<p>When perl is run under taint mode, <code>printf()</code> and <code>sprintf()</code> will now reject any tainted format argument. (Rafael Garcia-Suarez)</p>

<h2 id="undef-and-signal-handlers"><a class="permalink" href="perl5100delta.html#undef-and-signal-handlers">#</a><a id="undef"></a>undef and signal handlers</h2>

<p>Undefining or deleting a signal handler via <code>undef $SIG{FOO}</code> is now equivalent to setting it to <code>&#39;DEFAULT&#39;</code>. (Rafael Garcia-Suarez)</p>

<h2 id="strictures-and-dereferencing-in-defined()"><a class="permalink" href="perl5100delta.html#strictures-and-dereferencing-in-defined()">#</a><a id="strictures"></a><a id="strictures-and-dereferencing-in-defined"></a>strictures and dereferencing in defined()</h2>

<p><code>use strict &#39;refs&#39;</code> was ignoring taking a hard reference in an argument to defined(), as in :</p>

<pre><code>use strict &#39;refs&#39;;
my $x = &#39;foo&#39;;
if (defined $$x) {...}</code></pre>

<p>This now correctly produces the run-time error <code>Can&#39;t use string as a SCALAR ref while &quot;strict refs&quot; in use</code>.</p>

<p><code>defined @$foo</code> and <code>defined %$bar</code> are now also subject to <code>strict &#39;refs&#39;</code> (that is, <code>$foo</code> and <code>$bar</code> shall be proper references there.) (<code>defined(@foo)</code> and <code>defined(%bar)</code> are discouraged constructs anyway.) (Nicholas Clark)</p>

<h2 id="(?p{})-has-been-removed"><a class="permalink" href="perl5100delta.html#(?p%7B%7D)-has-been-removed">#</a><a id="p-has-been-removed"></a><code>(?p{})</code> has been removed</h2>

<p>The regular expression construct <code>(?p{})</code>, which was deprecated in perl 5.8, has been removed. Use <code>(??{})</code> instead. (Rafael Garcia-Suarez)</p>

<h2 id="Pseudo-hashes-have-been-removed"><a class="permalink" href="perl5100delta.html#Pseudo-hashes-have-been-removed">#</a><a id="Pseudo"></a>Pseudo-hashes have been removed</h2>

<p>Support for pseudo-hashes has been removed from Perl 5.9. (The <code>fields</code> pragma remains here, but uses an alternate implementation.)</p>

<h2 id="Removal-of-the-bytecode-compiler-and-of-perlcc"><a class="permalink" href="perl5100delta.html#Removal-of-the-bytecode-compiler-and-of-perlcc">#</a><a id="Removal"></a>Removal of the bytecode compiler and of perlcc</h2>

<p><code>perlcc</code>, the byteloader and the supporting modules (B::C, B::CC, B::Bytecode, etc.) are no longer distributed with the perl sources. Those experimental tools have never worked reliably, and, due to the lack of volunteers to keep them in line with the perl interpreter developments, it was decided to remove them instead of shipping a broken version of those. The last version of those modules can be found with perl 5.9.4.</p>

<p>However the B compiler framework stays supported in the perl core, as with the more useful modules it has permitted (among others, B::Deparse and B::Concise).</p>

<h2 id="Removal-of-the-JPL"><a class="permalink" href="perl5100delta.html#Removal-of-the-JPL">#</a><a id="Removal1"></a>Removal of the JPL</h2>

<p>The JPL (Java-Perl Lingo) has been removed from the perl sources tarball.</p>

<h2 id="Recursive-inheritance-detected-earlier"><a class="permalink" href="perl5100delta.html#Recursive-inheritance-detected-earlier">#</a><a id="Recursive2"></a>Recursive inheritance detected earlier</h2>

<p>Perl will now immediately throw an exception if you modify any package&#39;s <code>@ISA</code> in such a way that it would cause recursive inheritance.</p>

<p>Previously, the exception would not occur until Perl attempted to make use of the recursive inheritance while resolving a method or doing a <code>$foo-&gt;isa($bar)</code> lookup.</p>

<h2 id="warnings::enabled-and-warnings::warnif-changed-to-favor-users-of-modules"><a class="permalink" href="perl5100delta.html#warnings::enabled-and-warnings::warnif-changed-to-favor-users-of-modules">#</a><a id="warnings1"></a>warnings::enabled and warnings::warnif changed to favor users of modules</h2>

<p>The behaviour in 5.10.x favors the person using the module; The behaviour in 5.8.x favors the module writer;</p>

<p>Assume the following code:</p>

<pre><code>main calls Foo::Bar::baz()
Foo::Bar inherits from Foo::Base
Foo::Bar::baz() calls Foo::Base::_bazbaz()
Foo::Base::_bazbaz() calls: warnings::warnif(&#39;substr&#39;, &#39;some warning 
message&#39;);</code></pre>

<p>On 5.8.x, the code warns when Foo::Bar contains <code>use warnings;</code> It does not matter if Foo::Base or main have warnings enabled to disable the warning one has to modify Foo::Bar.</p>

<p>On 5.10.0 and newer, the code warns when main contains <code>use warnings;</code> It does not matter if Foo::Base or Foo::Bar have warnings enabled to disable the warning one has to modify main.</p>

<h1 id="Modules-and-Pragmata"><a class="permalink" href="perl5100delta.html#Modules-and-Pragmata">#</a><a id="Modules"></a>Modules and Pragmata</h1>

<h2 id="Upgrading-individual-core-modules"><a class="permalink" href="perl5100delta.html#Upgrading-individual-core-modules">#</a><a id="Upgrading"></a>Upgrading individual core modules</h2>

<p>Even more core modules are now also available separately through the CPAN. If you wish to update one of these modules, you don&#39;t need to wait for a new perl release. From within the cpan shell, running the &#39;r&#39; command will report on modules with upgrades available. See <code>perldoc CPAN</code> for more information.</p>

<h2 id="Pragmata-Changes"><a class="permalink" href="perl5100delta.html#Pragmata-Changes">#</a><a id="Pragmata"></a>Pragmata Changes</h2>

<dl>

<dt id="feature"><a class="permalink" href="perl5100delta.html#feature">#</a><code>feature</code></dt>
<dd>

<p>The new pragma <code>feature</code> is used to enable new features that might break old code. See <a href="perl5100delta.html#The-feature-pragma">&quot;The <code>feature</code> pragma&quot;</a> above.</p>

</dd>
<dt id="mro"><a class="permalink" href="perl5100delta.html#mro">#</a><code>mro</code></dt>
<dd>

<p>This new pragma enables to change the algorithm used to resolve inherited methods. See <a href="perl5100delta.html#New-Pragma%2C-mro">&quot;New Pragma, <code>mro</code>&quot;</a> above.</p>

</dd>
<dt id="Scoping-of-the-sort-pragma"><a class="permalink" href="perl5100delta.html#Scoping-of-the-sort-pragma">#</a><a id="Scoping"></a>Scoping of the <code>sort</code> pragma</dt>
<dd>

<p>The <code>sort</code> pragma is now lexically scoped. Its effect used to be global.</p>

</dd>
<dt id="Scoping-of-bignum,-bigint,-bigrat"><a class="permalink" href="perl5100delta.html#Scoping-of-bignum,-bigint,-bigrat">#</a><a id="Scoping1"></a><a id="Scoping-of-bignum-bigint-bigrat"></a>Scoping of <code>bignum</code>, <code>bigint</code>, <code>bigrat</code></dt>
<dd>

<p>The three numeric pragmas <code>bignum</code>, <code>bigint</code> and <code>bigrat</code> are now lexically scoped. (Tels)</p>

</dd>
<dt id="base"><a class="permalink" href="perl5100delta.html#base">#</a><code>base</code></dt>
<dd>

<p>The <code>base</code> pragma now warns if a class tries to inherit from itself. (Curtis &quot;Ovid&quot; Poe)</p>

</dd>
<dt id="strict-and-warnings"><a class="permalink" href="perl5100delta.html#strict-and-warnings">#</a><a id="strict"></a><code>strict</code> and <code>warnings</code></dt>
<dd>

<p><code>strict</code> and <code>warnings</code> will now complain loudly if they are loaded via incorrect casing (as in <code>use Strict;</code>). (Johan Vromans)</p>

</dd>
<dt id="version"><a class="permalink" href="perl5100delta.html#version">#</a><code>version</code></dt>
<dd>

<p>The <code>version</code> module provides support for version objects.</p>

</dd>
<dt id="warnings"><a class="permalink" href="perl5100delta.html#warnings">#</a><code>warnings</code></dt>
<dd>

<p>The <code>warnings</code> pragma doesn&#39;t load <code>Carp</code> anymore. That means that code that used <code>Carp</code> routines without having loaded it at compile time might need to be adjusted; typically, the following (faulty) code won&#39;t work anymore, and will require parentheses to be added after the function name:</p>

<pre><code>use warnings;
require Carp;
Carp::confess &#39;argh&#39;;</code></pre>

</dd>
<dt id="less"><a class="permalink" href="perl5100delta.html#less">#</a><code>less</code></dt>
<dd>

<p><code>less</code> now does something useful (or at least it tries to). In fact, it has been turned into a lexical pragma. So, in your modules, you can now test whether your users have requested to use less CPU, or less memory, less magic, or maybe even less fat. See <a href="less.html">less</a> for more. (Joshua ben Jore)</p>

</dd>
</dl>

<h2 id="New-modules"><a class="permalink" href="perl5100delta.html#New-modules">#</a><a id="New3"></a>New modules</h2>

<ul>

<li><p><code>encoding::warnings</code>, by Audrey Tang, is a module to emit warnings whenever an ASCII character string containing high-bit bytes is implicitly converted into UTF-8. It&#39;s a lexical pragma since Perl 5.9.4; on older perls, its effect is global.</p>

</li>
<li><p><code>Module::CoreList</code>, by Richard Clamp, is a small handy module that tells you what versions of core modules ship with any versions of Perl 5. It comes with a command-line frontend, <code>corelist</code>.</p>

</li>
<li><p><code>Math::BigInt::FastCalc</code> is an XS-enabled, and thus faster, version of <code>Math::BigInt::Calc</code>.</p>

</li>
<li><p><code>Compress::Zlib</code> is an interface to the zlib compression library. It comes with a bundled version of zlib, so having a working zlib is not a prerequisite to install it. It&#39;s used by <code>Archive::Tar</code> (see below).</p>

</li>
<li><p><code>IO::Zlib</code> is an <code>IO::</code>-style interface to <code>Compress::Zlib</code>.</p>

</li>
<li><p><code>Archive::Tar</code> is a module to manipulate <code>tar</code> archives.</p>

</li>
<li><p><code>Digest::SHA</code> is a module used to calculate many types of SHA digests, has been included for SHA support in the CPAN module.</p>

</li>
<li><p><code>ExtUtils::CBuilder</code> and <code>ExtUtils::ParseXS</code> have been added.</p>

</li>
<li><p><code>Hash::Util::FieldHash</code>, by Anno Siegel, has been added. This module provides support for <i>field hashes</i>: hashes that maintain an association of a reference with a value, in a thread-safe garbage-collected way. Such hashes are useful to implement inside-out objects.</p>

</li>
<li><p><code>Module::Build</code>, by Ken Williams, has been added. It&#39;s an alternative to <code>ExtUtils::MakeMaker</code> to build and install perl modules.</p>

</li>
<li><p><code>Module::Load</code>, by Jos Boumans, has been added. It provides a single interface to load Perl modules and <i>.pl</i> files.</p>

</li>
<li><p><code>Module::Loaded</code>, by Jos Boumans, has been added. It&#39;s used to mark modules as loaded or unloaded.</p>

</li>
<li><p><code>Package::Constants</code>, by Jos Boumans, has been added. It&#39;s a simple helper to list all constants declared in a given package.</p>

</li>
<li><p><code>Win32API::File</code>, by Tye McQueen, has been added (for Windows builds). This module provides low-level access to Win32 system API calls for files/dirs.</p>

</li>
<li><p><code>Locale::Maketext::Simple</code>, needed by CPANPLUS, is a simple wrapper around <code>Locale::Maketext::Lexicon</code>. Note that <code>Locale::Maketext::Lexicon</code> isn&#39;t included in the perl core; the behaviour of <code>Locale::Maketext::Simple</code> gracefully degrades when the later isn&#39;t present.</p>

</li>
<li><p><code>Params::Check</code> implements a generic input parsing/checking mechanism. It is used by CPANPLUS.</p>

</li>
<li><p><code>Term::UI</code> simplifies the task to ask questions at a terminal prompt.</p>

</li>
<li><p><code>Object::Accessor</code> provides an interface to create per-object accessors.</p>

</li>
<li><p><code>Module::Pluggable</code> is a simple framework to create modules that accept pluggable sub-modules.</p>

</li>
<li><p><code>Module::Load::Conditional</code> provides simple ways to query and possibly load installed modules.</p>

</li>
<li><p><code>Time::Piece</code> provides an object oriented interface to time functions, overriding the built-ins localtime() and gmtime().</p>

</li>
<li><p><code>IPC::Cmd</code> helps to find and run external commands, possibly interactively.</p>

</li>
<li><p><code>File::Fetch</code> provide a simple generic file fetching mechanism.</p>

</li>
<li><p><code>Log::Message</code> and <code>Log::Message::Simple</code> are used by the log facility of <code>CPANPLUS</code>.</p>

</li>
<li><p><code>Archive::Extract</code> is a generic archive extraction mechanism for <i>.tar</i> (plain, gzipped or bzipped) or <i>.zip</i> files.</p>

</li>
<li><p><code>CPANPLUS</code> provides an API and a command-line tool to access the CPAN mirrors.</p>

</li>
<li><p><code>Pod::Escapes</code> provides utilities that are useful in decoding Pod E&lt;...&gt; sequences.</p>

</li>
<li><p><code>Pod::Simple</code> is now the backend for several of the Pod-related modules included with Perl.</p>

</li>
</ul>

<h2 id="Selected-Changes-to-Core-Modules"><a class="permalink" href="perl5100delta.html#Selected-Changes-to-Core-Modules">#</a><a id="Selected"></a>Selected Changes to Core Modules</h2>

<dl>

<dt id="Attribute::Handlers"><a class="permalink" href="perl5100delta.html#Attribute::Handlers">#</a><a id="Attribute"></a><code>Attribute::Handlers</code></dt>
<dd>

<p><code>Attribute::Handlers</code> can now report the caller&#39;s file and line number. (David Feldman)</p>

<p>All interpreted attributes are now passed as array references. (Damian Conway)</p>

</dd>
<dt id="B::Lint"><a class="permalink" href="perl5100delta.html#B::Lint">#</a><a id="B1"></a><code>B::Lint</code></dt>
<dd>

<p><code>B::Lint</code> is now based on <code>Module::Pluggable</code>, and so can be extended with plugins. (Joshua ben Jore)</p>

</dd>
<dt id="B"><a class="permalink" href="perl5100delta.html#B">#</a><code>B</code></dt>
<dd>

<p>It&#39;s now possible to access the lexical pragma hints (<code>%^H</code>) by using the method B::COP::hints_hash(). It returns a <code>B::RHE</code> object, which in turn can be used to get a hash reference via the method B::RHE::HASH(). (Joshua ben Jore)</p>

</dd>
<dt id="Thread"><a class="permalink" href="perl5100delta.html#Thread">#</a><code>Thread</code></dt>
<dd>

<p>As the old 5005thread threading model has been removed, in favor of the ithreads scheme, the <code>Thread</code> module is now a compatibility wrapper, to be used in old code only. It has been removed from the default list of dynamic extensions.</p>

</dd>
</dl>

<h1 id="Utility-Changes"><a class="permalink" href="perl5100delta.html#Utility-Changes">#</a><a id="Utility"></a>Utility Changes</h1>

<dl>

<dt id="perl-d"><a class="permalink" href="perl5100delta.html#perl-d">#</a><a id="perl"></a><a id="perl--d"></a>perl -d</dt>
<dd>

<p>The Perl debugger can now save all debugger commands for sourcing later; notably, it can now emulate stepping backwards, by restarting and rerunning all bar the last command from a saved command history.</p>

<p>It can also display the parent inheritance tree of a given class, with the <code>i</code> command.</p>

</dd>
<dt id="ptar"><a class="permalink" href="perl5100delta.html#ptar">#</a>ptar</dt>
<dd>

<p><code>ptar</code> is a pure perl implementation of <code>tar</code> that comes with <code>Archive::Tar</code>.</p>

</dd>
<dt id="ptardiff"><a class="permalink" href="perl5100delta.html#ptardiff">#</a>ptardiff</dt>
<dd>

<p><code>ptardiff</code> is a small utility used to generate a diff between the contents of a tar archive and a directory tree. Like <code>ptar</code>, it comes with <code>Archive::Tar</code>.</p>

</dd>
<dt id="shasum"><a class="permalink" href="perl5100delta.html#shasum">#</a>shasum</dt>
<dd>

<p><code>shasum</code> is a command-line utility, used to print or to check SHA digests. It comes with the new <code>Digest::SHA</code> module.</p>

</dd>
<dt id="corelist"><a class="permalink" href="perl5100delta.html#corelist">#</a>corelist</dt>
<dd>

<p>The <code>corelist</code> utility is now installed with perl (see <a href="perl5100delta.html#New-modules">&quot;New modules&quot;</a> above).</p>

</dd>
<dt id="h2ph-and-h2xs"><a class="permalink" href="perl5100delta.html#h2ph-and-h2xs">#</a><a id="h2ph"></a>h2ph and h2xs</dt>
<dd>

<p><code>h2ph</code> and <code>h2xs</code> have been made more robust with regard to &quot;modern&quot; C code.</p>

<p><code>h2xs</code> implements a new option <code>--use-xsloader</code> to force use of <code>XSLoader</code> even in backwards compatible modules.</p>

<p>The handling of authors&#39; names that had apostrophes has been fixed.</p>

<p>Any enums with negative values are now skipped.</p>

</dd>
<dt id="perlivp"><a class="permalink" href="perl5100delta.html#perlivp">#</a>perlivp</dt>
<dd>

<p><code>perlivp</code> no longer checks for <i>*.ph</i> files by default. Use the new <code>-a</code> option to run <i>all</i> tests.</p>

</dd>
<dt id="find2perl"><a class="permalink" href="perl5100delta.html#find2perl">#</a>find2perl</dt>
<dd>

<p><code>find2perl</code> now assumes <code>-print</code> as a default action. Previously, it needed to be specified explicitly.</p>

<p>Several bugs have been fixed in <code>find2perl</code>, regarding <code>-exec</code> and <code>-eval</code>. Also the options <code>-path</code>, <code>-ipath</code> and <code>-iname</code> have been added.</p>

</dd>
<dt id="config_data"><a class="permalink" href="perl5100delta.html#config_data">#</a>config_data</dt>
<dd>

<p><code>config_data</code> is a new utility that comes with <code>Module::Build</code>. It provides a command-line interface to the configuration of Perl modules that use Module::Build&#39;s framework of configurability (that is, <code>*::ConfigData</code> modules that contain local configuration information for their parent modules.)</p>

</dd>
<dt id="cpanp"><a class="permalink" href="perl5100delta.html#cpanp">#</a>cpanp</dt>
<dd>

<p><code>cpanp</code>, the CPANPLUS shell, has been added. (<code>cpanp-run-perl</code>, a helper for CPANPLUS operation, has been added too, but isn&#39;t intended for direct use).</p>

</dd>
<dt id="cpan2dist"><a class="permalink" href="perl5100delta.html#cpan2dist">#</a>cpan2dist</dt>
<dd>

<p><code>cpan2dist</code> is a new utility that comes with CPANPLUS. It&#39;s a tool to create distributions (or packages) from CPAN modules.</p>

</dd>
<dt id="pod2html"><a class="permalink" href="perl5100delta.html#pod2html">#</a>pod2html</dt>
<dd>

<p>The output of <code>pod2html</code> has been enhanced to be more customizable via CSS. Some formatting problems were also corrected. (Jari Aalto)</p>

</dd>
</dl>

<h1 id="New-Documentation"><a class="permalink" href="perl5100delta.html#New-Documentation">#</a><a id="New4"></a>New Documentation</h1>

<p>The <a href="perlpragma.html">perlpragma</a> manpage documents how to write one&#39;s own lexical pragmas in pure Perl (something that is possible starting with 5.9.4).</p>

<p>The new <a href="perlglossary.html">perlglossary</a> manpage is a glossary of terms used in the Perl documentation, technical and otherwise, kindly provided by O&#39;Reilly Media, Inc.</p>

<p>The <a href="perlreguts.html">perlreguts</a> manpage, courtesy of Yves Orton, describes internals of the Perl regular expression engine.</p>

<p>The <a href="perlreapi.html">perlreapi</a> manpage describes the interface to the perl interpreter used to write pluggable regular expression engines (by Ævar Arnfjörð Bjarmason).</p>

<p>The <a href="perlunitut.html">perlunitut</a> manpage is a tutorial for programming with Unicode and string encodings in Perl, courtesy of Juerd Waalboer.</p>

<p>A new manual page, <a href="perlunifaq.html">perlunifaq</a> (the Perl Unicode FAQ), has been added (Juerd Waalboer).</p>

<p>The <a href="perlcommunity.html">perlcommunity</a> manpage gives a description of the Perl community on the Internet and in real life. (Edgar &quot;Trizor&quot; Bering)</p>

<p>The <a href="CORE.html">CORE</a> manual page documents the <code>CORE::</code> namespace. (Tels)</p>

<p>The long-existing feature of <code>/(?{...})/</code> regexps setting <code>$_</code> and pos() is now documented.</p>

<h1 id="Performance-Enhancements"><a class="permalink" href="perl5100delta.html#Performance-Enhancements">#</a><a id="Performance"></a>Performance Enhancements</h1>

<h2 id="In-place-sorting"><a class="permalink" href="perl5100delta.html#In-place-sorting">#</a><a id="In"></a>In-place sorting</h2>

<p>Sorting arrays in place (<code>@a = sort @a</code>) is now optimized to avoid making a temporary copy of the array.</p>

<p>Likewise, <code>reverse sort ...</code> is now optimized to sort in reverse, avoiding the generation of a temporary intermediate list.</p>

<h2 id="Lexical-array-access"><a class="permalink" href="perl5100delta.html#Lexical-array-access">#</a><a id="Lexical1"></a>Lexical array access</h2>

<p>Access to elements of lexical arrays via a numeric constant between 0 and 255 is now faster. (This used to be only the case for global arrays.)</p>

<h2 id="XS-assisted-SWASHGET"><a class="permalink" href="perl5100delta.html#XS-assisted-SWASHGET">#</a><a id="XS"></a>XS-assisted SWASHGET</h2>

<p>Some pure-perl code that perl was using to retrieve Unicode properties and transliteration mappings has been reimplemented in XS.</p>

<h2 id="Constant-subroutines"><a class="permalink" href="perl5100delta.html#Constant-subroutines">#</a><a id="Constant"></a>Constant subroutines</h2>

<p>The interpreter internals now support a far more memory efficient form of inlineable constants. Storing a reference to a constant value in a symbol table is equivalent to a full typeglob referencing a constant subroutine, but using about 400 bytes less memory. This proxy constant subroutine is automatically upgraded to a real typeglob with subroutine if necessary. The approach taken is analogous to the existing space optimisation for subroutine stub declarations, which are stored as plain scalars in place of the full typeglob.</p>

<p>Several of the core modules have been converted to use this feature for their system dependent constants - as a result <code>use POSIX;</code> now takes about 200K less memory.</p>

<h2 id="PERL_DONT_CREATE_GVSV"><a class="permalink" href="perl5100delta.html#PERL_DONT_CREATE_GVSV">#</a><code>PERL_DONT_CREATE_GVSV</code></h2>

<p>The new compilation flag <code>PERL_DONT_CREATE_GVSV</code>, introduced as an option in perl 5.8.8, is turned on by default in perl 5.9.3. It prevents perl from creating an empty scalar with every new typeglob. See <a href="perl589delta.html">perl589delta</a> for details.</p>

<h2 id="Weak-references-are-cheaper"><a class="permalink" href="perl5100delta.html#Weak-references-are-cheaper">#</a><a id="Weak"></a>Weak references are cheaper</h2>

<p>Weak reference creation is now <i>O(1)</i> rather than <i>O(n)</i>, courtesy of Nicholas Clark. Weak reference deletion remains <i>O(n)</i>, but if deletion only happens at program exit, it may be skipped completely.</p>

<h2 id="sort()-enhancements"><a class="permalink" href="perl5100delta.html#sort()-enhancements">#</a><a id="sort"></a><a id="sort-enhancements"></a>sort() enhancements</h2>

<p>Salvador Fandiño provided improvements to reduce the memory usage of <code>sort</code> and to speed up some cases.</p>

<h2 id="Memory-optimisations"><a class="permalink" href="perl5100delta.html#Memory-optimisations">#</a><a id="Memory"></a>Memory optimisations</h2>

<p>Several internal data structures (typeglobs, GVs, CVs, formats) have been restructured to use less memory. (Nicholas Clark)</p>

<h2 id="UTF-8-cache-optimisation"><a class="permalink" href="perl5100delta.html#UTF-8-cache-optimisation">#</a><a id="UTF"></a>UTF-8 cache optimisation</h2>

<p>The UTF-8 caching code is now more efficient, and used more often. (Nicholas Clark)</p>

<h2 id="Sloppy-stat-on-Windows"><a class="permalink" href="perl5100delta.html#Sloppy-stat-on-Windows">#</a><a id="Sloppy"></a>Sloppy stat on Windows</h2>

<p>On Windows, perl&#39;s stat() function normally opens the file to determine the link count and update attributes that may have been changed through hard links. Setting ${^WIN32_SLOPPY_STAT} to a true value speeds up stat() by not performing this operation. (Jan Dubois)</p>

<h2 id="Regular-expressions-optimisations"><a class="permalink" href="perl5100delta.html#Regular-expressions-optimisations">#</a><a id="Regular1"></a>Regular expressions optimisations</h2>

<dl>

<dt id="Engine-de-recursivised"><a class="permalink" href="perl5100delta.html#Engine-de-recursivised">#</a><a id="Engine"></a>Engine de-recursivised</dt>
<dd>

<p>The regular expression engine is no longer recursive, meaning that patterns that used to overflow the stack will either die with useful explanations, or run to completion, which, since they were able to blow the stack before, will likely take a very long time to happen. If you were experiencing the occasional stack overflow (or segfault) and upgrade to discover that now perl apparently hangs instead, look for a degenerate regex. (Dave Mitchell)</p>

</dd>
<dt id="Single-char-char-classes-treated-as-literals"><a class="permalink" href="perl5100delta.html#Single-char-char-classes-treated-as-literals">#</a><a id="Single"></a>Single char char-classes treated as literals</dt>
<dd>

<p>Classes of a single character are now treated the same as if the character had been used as a literal, meaning that code that uses char-classes as an escaping mechanism will see a speedup. (Yves Orton)</p>

</dd>
<dt id="Trie-optimisation-of-literal-string-alternations"><a class="permalink" href="perl5100delta.html#Trie-optimisation-of-literal-string-alternations">#</a><a id="Trie"></a>Trie optimisation of literal string alternations</dt>
<dd>

<p>Alternations, where possible, are optimised into more efficient matching structures. String literal alternations are merged into a trie and are matched simultaneously. This means that instead of O(N) time for matching N alternations at a given point, the new code performs in O(1) time. A new special variable, ${^RE_TRIE_MAXBUF}, has been added to fine-tune this optimization. (Yves Orton)</p>

<p><b>Note:</b> Much code exists that works around perl&#39;s historic poor performance on alternations. Often the tricks used to do so will disable the new optimisations. Hopefully the utility modules used for this purpose will be educated about these new optimisations.</p>

</dd>
<dt id="Aho-Corasick-start-point-optimisation"><a class="permalink" href="perl5100delta.html#Aho-Corasick-start-point-optimisation">#</a><a id="Aho"></a>Aho-Corasick start-point optimisation</dt>
<dd>

<p>When a pattern starts with a trie-able alternation and there aren&#39;t better optimisations available, the regex engine will use Aho-Corasick matching to find the start point. (Yves Orton)</p>

</dd>
</dl>

<h1 id="Installation-and-Configuration-Improvements"><a class="permalink" href="perl5100delta.html#Installation-and-Configuration-Improvements">#</a><a id="Installation"></a>Installation and Configuration Improvements</h1>

<h2 id="Configuration-improvements"><a class="permalink" href="perl5100delta.html#Configuration-improvements">#</a><a id="Configuration"></a>Configuration improvements</h2>

<dl>

<dt id="-Dusesitecustomize"><a class="permalink" href="perl5100delta.html#-Dusesitecustomize">#</a><a id="Dusesitecustomize"></a><code>-Dusesitecustomize</code></dt>
<dd>

<p>Run-time customization of @INC can be enabled by passing the <code>-Dusesitecustomize</code> flag to Configure. When enabled, this will make perl run <i>$sitelibexp/sitecustomize.pl</i> before anything else. This script can then be set up to add additional entries to @INC.</p>

</dd>
<dt id="Relocatable-installations"><a class="permalink" href="perl5100delta.html#Relocatable-installations">#</a><a id="Relocatable"></a>Relocatable installations</dt>
<dd>

<p>There is now Configure support for creating a relocatable perl tree. If you Configure with <code>-Duserelocatableinc</code>, then the paths in @INC (and everything else in %Config) can be optionally located via the path of the perl executable.</p>

<p>That means that, if the string <code>&quot;.../&quot;</code> is found at the start of any path, it&#39;s substituted with the directory of $^X. So, the relocation can be configured on a per-directory basis, although the default with <code>-Duserelocatableinc</code> is that everything is relocated. The initial install is done to the original configured prefix.</p>

</dd>
<dt id="strlcat()-and-strlcpy()"><a class="permalink" href="perl5100delta.html#strlcat()-and-strlcpy()">#</a><a id="strlcat"></a><a id="strlcat-and-strlcpy"></a>strlcat() and strlcpy()</dt>
<dd>

<p>The configuration process now detects whether strlcat() and strlcpy() are available. When they are not available, perl&#39;s own version is used (from Russ Allbery&#39;s public domain implementation). Various places in the perl interpreter now use them. (Steve Peters)</p>

</dd>
<dt id="d_pseudofork-and-d_printf_format_null"><a class="permalink" href="perl5100delta.html#d_pseudofork-and-d_printf_format_null">#</a><a id="d_pseudofork"></a><code>d_pseudofork</code> and <code>d_printf_format_null</code></dt>
<dd>

<p>A new configuration variable, available as <code>$Config{d_pseudofork}</code> in the <a href="Config.html">Config</a> module, has been added, to distinguish real fork() support from fake pseudofork used on Windows platforms.</p>

<p>A new configuration variable, <code>d_printf_format_null</code>, has been added, to see if printf-like formats are allowed to be NULL.</p>

</dd>
<dt id="Configure-help"><a class="permalink" href="perl5100delta.html#Configure-help">#</a><a id="Configure"></a>Configure help</dt>
<dd>

<p><code>Configure -h</code> has been extended with the most commonly used options.</p>

</dd>
</dl>

<h2 id="Compilation-improvements"><a class="permalink" href="perl5100delta.html#Compilation-improvements">#</a><a id="Compilation"></a>Compilation improvements</h2>

<dl>

<dt id="Parallel-build"><a class="permalink" href="perl5100delta.html#Parallel-build">#</a><a id="Parallel"></a>Parallel build</dt>
<dd>

<p>Parallel makes should work properly now, although there may still be problems if <code>make test</code> is instructed to run in parallel.</p>

</dd>
<dt id="Borland&#39;s-compilers-support"><a class="permalink" href="perl5100delta.html#Borland&#39;s-compilers-support">#</a><a id="Borland"></a><a id="Borlands-compilers-support"></a>Borland&#39;s compilers support</dt>
<dd>

<p>Building with Borland&#39;s compilers on Win32 should work more smoothly. In particular Steve Hay has worked to side step many warnings emitted by their compilers and at least one C compiler internal error.</p>

</dd>
<dt id="Static-build-on-Windows"><a class="permalink" href="perl5100delta.html#Static-build-on-Windows">#</a><a id="Static"></a>Static build on Windows</dt>
<dd>

<p>Perl extensions on Windows now can be statically built into the Perl DLL.</p>

<p>Also, it&#39;s now possible to build a <code>perl-static.exe</code> that doesn&#39;t depend on the Perl DLL on Win32. See the Win32 makefiles for details. (Vadim Konovalov)</p>

</dd>
<dt id="ppport.h-files"><a class="permalink" href="perl5100delta.html#ppport.h-files">#</a><a id="ppport"></a>ppport.h files</dt>
<dd>

<p>All <i>ppport.h</i> files in the XS modules bundled with perl are now autogenerated at build time. (Marcus Holland-Moritz)</p>

</dd>
<dt id="C++-compatibility"><a class="permalink" href="perl5100delta.html#C++-compatibility">#</a><a id="C"></a><a id="C-compatibility"></a>C++ compatibility</dt>
<dd>

<p>Efforts have been made to make perl and the core XS modules compilable with various C++ compilers (although the situation is not perfect with some of the compilers on some of the platforms tested.)</p>

</dd>
<dt id="Support-for-Microsoft-64-bit-compiler"><a class="permalink" href="perl5100delta.html#Support-for-Microsoft-64-bit-compiler">#</a><a id="Support"></a>Support for Microsoft 64-bit compiler</dt>
<dd>

<p>Support for building perl with Microsoft&#39;s 64-bit compiler has been improved. (ActiveState)</p>

</dd>
<dt id="Visual-C++"><a class="permalink" href="perl5100delta.html#Visual-C++">#</a><a id="Visual"></a><a id="Visual-C"></a>Visual C++</dt>
<dd>

<p>Perl can now be compiled with Microsoft Visual C++ 2005 (and 2008 Beta 2).</p>

</dd>
<dt id="Win32-builds"><a class="permalink" href="perl5100delta.html#Win32-builds">#</a><a id="Win32"></a>Win32 builds</dt>
<dd>

<p>All win32 builds (MS-Win, WinCE) have been merged and cleaned up.</p>

</dd>
</dl>

<h2 id="Installation-improvements"><a class="permalink" href="perl5100delta.html#Installation-improvements">#</a><a id="Installation1"></a>Installation improvements</h2>

<dl>

<dt id="Module-auxiliary-files"><a class="permalink" href="perl5100delta.html#Module-auxiliary-files">#</a><a id="Module"></a>Module auxiliary files</dt>
<dd>

<p>README files and changelogs for CPAN modules bundled with perl are no longer installed.</p>

</dd>
</dl>

<h2 id="New-Or-Improved-Platforms"><a class="permalink" href="perl5100delta.html#New-Or-Improved-Platforms">#</a><a id="New5"></a>New Or Improved Platforms</h2>

<p>Perl has been reported to work on Symbian OS. See <a href="https://perldoc.perl.org/5.35.0/perlsymbian">perlsymbian</a> for more information.</p>

<p>Many improvements have been made towards making Perl work correctly on z/OS.</p>

<p>Perl has been reported to work on DragonFlyBSD and MidnightBSD.</p>

<p>Perl has also been reported to work on NexentaOS ( http://www.gnusolaris.org/ ).</p>

<p>The VMS port has been improved. See <a href="perlvms.html">perlvms</a>.</p>

<p>Support for Cray XT4 Catamount/Qk has been added. See <i>hints/catamount.sh</i> in the source code distribution for more information.</p>

<p>Vendor patches have been merged for RedHat and Gentoo.</p>

<p>DynaLoader::dl_unload_file() now works on Windows.</p>

<h1 id="Selected-Bug-Fixes"><a class="permalink" href="perl5100delta.html#Selected-Bug-Fixes">#</a><a id="Selected1"></a>Selected Bug Fixes</h1>

<dl>

<dt id="strictures-in-regexp-eval-blocks"><a class="permalink" href="perl5100delta.html#strictures-in-regexp-eval-blocks">#</a><a id="strictures1"></a>strictures in regexp-eval blocks</dt>
<dd>

<p><code>strict</code> wasn&#39;t in effect in regexp-eval blocks (<code>/(?{...})/</code>).</p>

</dd>
<dt id="Calling-CORE::require()"><a class="permalink" href="perl5100delta.html#Calling-CORE::require()">#</a><a id="Calling"></a><a id="Calling-CORE::require"></a>Calling CORE::require()</dt>
<dd>

<p>CORE::require() and CORE::do() were always parsed as require() and do() when they were overridden. This is now fixed.</p>

</dd>
<dt id="Subscripts-of-slices"><a class="permalink" href="perl5100delta.html#Subscripts-of-slices">#</a><a id="Subscripts"></a>Subscripts of slices</dt>
<dd>

<p>You can now use a non-arrowed form for chained subscripts after a list slice, like in:</p>

<pre><code class="plaintext">({foo =&gt; &quot;bar&quot;})[0]{foo}</code></pre>

<p>This used to be a syntax error; a <code>-&gt;</code> was required.</p>

</dd>
<dt id="no-warnings-&#39;category&#39;-works-correctly-with-w"><a class="permalink" href="perl5100delta.html#no-warnings-&#39;category&#39;-works-correctly-with-w">#</a><a id="no1"></a><a id="no-warnings-category-works-correctly-with--w"></a><code>no warnings &#39;category&#39;</code> works correctly with -w</dt>
<dd>

<p>Previously when running with warnings enabled globally via <code>-w</code>, selective disabling of specific warning categories would actually turn off all warnings. This is now fixed; now <code>no warnings &#39;io&#39;;</code> will only turn off warnings in the <code>io</code> class. Previously it would erroneously turn off all warnings.</p>

</dd>
<dt id="threads-improvements"><a class="permalink" href="perl5100delta.html#threads-improvements">#</a><a id="threads"></a>threads improvements</dt>
<dd>

<p>Several memory leaks in ithreads were closed. Also, ithreads were made less memory-intensive.</p>

<p><code>threads</code> is now a dual-life module, also available on CPAN. It has been expanded in many ways. A kill() method is available for thread signalling. One can get thread status, or the list of running or joinable threads.</p>

<p>A new <code>threads-&gt;exit()</code> method is used to exit from the application (this is the default for the main thread) or from the current thread only (this is the default for all other threads). On the other hand, the exit() built-in now always causes the whole application to terminate. (Jerry D. Hedden)</p>

</dd>
<dt id="chr()-and-negative-values"><a class="permalink" href="perl5100delta.html#chr()-and-negative-values">#</a><a id="chr"></a><a id="chr-and-negative-values"></a>chr() and negative values</dt>
<dd>

<p>chr() on a negative value now gives <code>\x{FFFD}</code>, the Unicode replacement character, unless when the <code>bytes</code> pragma is in effect, where the low eight bits of the value are used.</p>

</dd>
<dt id="PERL5SHELL-and-tainting"><a class="permalink" href="perl5100delta.html#PERL5SHELL-and-tainting">#</a><a id="PERL5SHELL"></a>PERL5SHELL and tainting</dt>
<dd>

<p>On Windows, the PERL5SHELL environment variable is now checked for taintedness. (Rafael Garcia-Suarez)</p>

</dd>
<dt id="Using-*FILE{IO}"><a class="permalink" href="perl5100delta.html#Using-*FILE%7BIO%7D">#</a><a id="Using"></a><a id="Using-FILE-IO"></a>Using *FILE{IO}</dt>
<dd>

<p><code>stat()</code> and <code>-X</code> filetests now treat *FILE{IO} filehandles like *FILE filehandles. (Steve Peters)</p>

</dd>
<dt id="Overloading-and-reblessing"><a class="permalink" href="perl5100delta.html#Overloading-and-reblessing">#</a><a id="Overloading"></a>Overloading and reblessing</dt>
<dd>

<p>Overloading now works when references are reblessed into another class. Internally, this has been implemented by moving the flag for &quot;overloading&quot; from the reference to the referent, which logically is where it should always have been. (Nicholas Clark)</p>

</dd>
<dt id="Overloading-and-UTF-8"><a class="permalink" href="perl5100delta.html#Overloading-and-UTF-8">#</a><a id="Overloading1"></a>Overloading and UTF-8</dt>
<dd>

<p>A few bugs related to UTF-8 handling with objects that have stringification overloaded have been fixed. (Nicholas Clark)</p>

</dd>
<dt id="eval-memory-leaks-fixed"><a class="permalink" href="perl5100delta.html#eval-memory-leaks-fixed">#</a><a id="eval"></a>eval memory leaks fixed</dt>
<dd>

<p>Traditionally, <code>eval &#39;syntax error&#39;</code> has leaked badly. Many (but not all) of these leaks have now been eliminated or reduced. (Dave Mitchell)</p>

</dd>
<dt id="Random-device-on-Windows"><a class="permalink" href="perl5100delta.html#Random-device-on-Windows">#</a><a id="Random"></a>Random device on Windows</dt>
<dd>

<p>In previous versions, perl would read the file <i>/dev/urandom</i> if it existed when seeding its random number generator. That file is unlikely to exist on Windows, and if it did would probably not contain appropriate data, so perl no longer tries to read it on Windows. (Alex Davies)</p>

</dd>
<dt id="PERLIO_DEBUG"><a class="permalink" href="perl5100delta.html#PERLIO_DEBUG">#</a>PERLIO_DEBUG</dt>
<dd>

<p>The <code>PERLIO_DEBUG</code> environment variable no longer has any effect for setuid scripts and for scripts run with <b>-T</b>.</p>

<p>Moreover, with a thread-enabled perl, using <code>PERLIO_DEBUG</code> could lead to an internal buffer overflow. This has been fixed.</p>

</dd>
<dt id="PerlIO::scalar-and-read-only-scalars"><a class="permalink" href="perl5100delta.html#PerlIO::scalar-and-read-only-scalars">#</a><a id="PerlIO"></a>PerlIO::scalar and read-only scalars</dt>
<dd>

<p>PerlIO::scalar will now prevent writing to read-only scalars. Moreover, seek() is now supported with PerlIO::scalar-based filehandles, the underlying string being zero-filled as needed. (Rafael, Jarkko Hietaniemi)</p>

</dd>
<dt id="study()-and-UTF-8"><a class="permalink" href="perl5100delta.html#study()-and-UTF-8">#</a><a id="study"></a><a id="study-and-UTF-8"></a>study() and UTF-8</dt>
<dd>

<p>study() never worked for UTF-8 strings, but could lead to false results. It&#39;s now a no-op on UTF-8 data. (Yves Orton)</p>

</dd>
<dt id="Critical-signals"><a class="permalink" href="perl5100delta.html#Critical-signals">#</a><a id="Critical"></a>Critical signals</dt>
<dd>

<p>The signals SIGILL, SIGBUS and SIGSEGV are now always delivered in an &quot;unsafe&quot; manner (contrary to other signals, that are deferred until the perl interpreter reaches a reasonably stable state; see <a href="perlipc.html#Deferred-Signals-%28Safe-Signals%29">&quot;Deferred Signals (Safe Signals)&quot; in perlipc</a>). (Rafael)</p>

</dd>
<dt id="@INC-hook-fix"><a class="permalink" href="perl5100delta.html#@INC-hook-fix">#</a><a id="INC-hook-fix"></a>@INC-hook fix</dt>
<dd>

<p>When a module or a file is loaded through an @INC-hook, and when this hook has set a filename entry in %INC, __FILE__ is now set for this module accordingly to the contents of that %INC entry. (Rafael)</p>

</dd>
<dt id="-t-switch-fix"><a class="permalink" href="perl5100delta.html#-t-switch-fix">#</a><a id="t-switch-fix"></a><code>-t</code> switch fix</dt>
<dd>

<p>The <code>-w</code> and <code>-t</code> switches can now be used together without messing up which categories of warnings are activated. (Rafael)</p>

</dd>
<dt id="Duping-UTF-8-filehandles"><a class="permalink" href="perl5100delta.html#Duping-UTF-8-filehandles">#</a><a id="Duping"></a>Duping UTF-8 filehandles</dt>
<dd>

<p>Duping a filehandle which has the <code>:utf8</code> PerlIO layer set will now properly carry that layer on the duped filehandle. (Rafael)</p>

</dd>
<dt id="Localisation-of-hash-elements"><a class="permalink" href="perl5100delta.html#Localisation-of-hash-elements">#</a><a id="Localisation"></a>Localisation of hash elements</dt>
<dd>

<p>Localizing a hash element whose key was given as a variable didn&#39;t work correctly if the variable was changed while the local() was in effect (as in <code>local $h{$x}; ++$x</code>). (Bo Lindbergh)</p>

</dd>
</dl>

<h1 id="New-or-Changed-Diagnostics"><a class="permalink" href="perl5100delta.html#New-or-Changed-Diagnostics">#</a><a id="New6"></a>New or Changed Diagnostics</h1>

<dl>

<dt id="Use-of-uninitialized-value"><a class="permalink" href="perl5100delta.html#Use-of-uninitialized-value">#</a><a id="Use"></a>Use of uninitialized value</dt>
<dd>

<p>Perl will now try to tell you the name of the variable (if any) that was undefined.</p>

</dd>
<dt id="Deprecated-use-of-my()-in-false-conditional"><a class="permalink" href="perl5100delta.html#Deprecated-use-of-my()-in-false-conditional">#</a><a id="Deprecated"></a><a id="Deprecated-use-of-my-in-false-conditional"></a>Deprecated use of my() in false conditional</dt>
<dd>

<p>A new deprecation warning, <i>Deprecated use of my() in false conditional</i>, has been added, to warn against the use of the dubious and deprecated construct</p>

<pre><code>my $x if 0;</code></pre>

<p>See <a href="perldiag.html">perldiag</a>. Use <code>state</code> variables instead.</p>

</dd>
<dt id="!=~-should-be-!~"><a class="permalink" href="perl5100delta.html#!=~-should-be-!~">#</a><a id="should-be"></a>!=~ should be !~</dt>
<dd>

<p>A new warning, <code>!=~ should be !~</code>, is emitted to prevent this misspelling of the non-matching operator.</p>

</dd>
<dt id="Newline-in-left-justified-string"><a class="permalink" href="perl5100delta.html#Newline-in-left-justified-string">#</a><a id="Newline"></a>Newline in left-justified string</dt>
<dd>

<p>The warning <i>Newline in left-justified string</i> has been removed.</p>

</dd>
<dt id="Too-late-for-&quot;-T&quot;-option"><a class="permalink" href="perl5100delta.html#Too-late-for-%22-T%22-option">#</a><a id="Too"></a><a id="Too-late-for--T-option"></a>Too late for &quot;-T&quot; option</dt>
<dd>

<p>The error <i>Too late for &quot;-T&quot; option</i> has been reformulated to be more descriptive.</p>

</dd>
<dt id="&quot;%s&quot;-variable-%s-masks-earlier-declaration"><a class="permalink" href="perl5100delta.html#%22%25s%22-variable-%25s-masks-earlier-declaration">#</a><a id="s-variable-s-masks-earlier-declaration"></a>&quot;%s&quot; variable %s masks earlier declaration</dt>
<dd>

<p>This warning is now emitted in more consistent cases; in short, when one of the declarations involved is a <code>my</code> variable:</p>

<pre><code>my $x;   my $x;	# warns
my $x;  our $x;	# warns
our $x;  my $x;	# warns</code></pre>

<p>On the other hand, the following:</p>

<pre><code>our $x; our $x;</code></pre>

<p>now gives a <code>&quot;our&quot; variable %s redeclared</code> warning.</p>

</dd>
<dt id="readdir()/closedir()/etc.-attempted-on-invalid-dirhandle"><a class="permalink" href="perl5100delta.html#readdir()/closedir()/etc.-attempted-on-invalid-dirhandle">#</a><a id="readdir1"></a><a id="readdir-closedir-etc.-attempted-on-invalid-dirhandle"></a>readdir()/closedir()/etc. attempted on invalid dirhandle</dt>
<dd>

<p>These new warnings are now emitted when a dirhandle is used but is either closed or not really a dirhandle.</p>

</dd>
<dt id="Opening-dirhandle/filehandle-%s-also-as-a-file/directory"><a class="permalink" href="perl5100delta.html#Opening-dirhandle/filehandle-%25s-also-as-a-file/directory">#</a><a id="Opening"></a><a id="Opening-dirhandle-filehandle-s-also-as-a-file-directory"></a>Opening dirhandle/filehandle %s also as a file/directory</dt>
<dd>

<p>Two deprecation warnings have been added: (Rafael)</p>

<pre><code>Opening dirhandle %s also as a file
Opening filehandle %s also as a directory</code></pre>

</dd>
<dt id="Use-of-P-is-deprecated"><a class="permalink" href="perl5100delta.html#Use-of-P-is-deprecated">#</a><a id="Use1"></a><a id="Use-of--P-is-deprecated"></a>Use of -P is deprecated</dt>
<dd>

<p>Perl&#39;s command-line switch <code>-P</code> is now deprecated.</p>

</dd>
<dt id="v-string-in-use/require-is-non-portable"><a class="permalink" href="perl5100delta.html#v-string-in-use/require-is-non-portable">#</a><a id="v"></a><a id="v-string-in-use-require-is-non-portable"></a>v-string in use/require is non-portable</dt>
<dd>

<p>Perl will warn you against potential backwards compatibility problems with the <code>use VERSION</code> syntax.</p>

</dd>
<dt id="perl-V"><a class="permalink" href="perl5100delta.html#perl-V">#</a><a id="perl1"></a><a id="perl--V"></a>perl -V</dt>
<dd>

<p><code>perl -V</code> has several improvements, making it more useable from shell scripts to get the value of configuration variables. See <a href="perlrun.html">perlrun</a> for details.</p>

</dd>
</dl>

<h1 id="Changed-Internals"><a class="permalink" href="perl5100delta.html#Changed-Internals">#</a><a id="Changed"></a>Changed Internals</h1>

<p>In general, the source code of perl has been refactored, tidied up, and optimized in many places. Also, memory management and allocation has been improved in several points.</p>

<p>When compiling the perl core with gcc, as many gcc warning flags are turned on as is possible on the platform. (This quest for cleanliness doesn&#39;t extend to XS code because we cannot guarantee the tidiness of code we didn&#39;t write.) Similar strictness flags have been added or tightened for various other C compilers.</p>

<h2 id="Reordering-of-SVt_*-constants"><a class="permalink" href="perl5100delta.html#Reordering-of-SVt_*-constants">#</a><a id="Reordering"></a><a id="Reordering-of-SVt_-constants"></a>Reordering of SVt_* constants</h2>

<p>The relative ordering of constants that define the various types of <code>SV</code> have changed; in particular, <code>SVt_PVGV</code> has been moved before <code>SVt_PVLV</code>, <code>SVt_PVAV</code>, <code>SVt_PVHV</code> and <code>SVt_PVCV</code>. This is unlikely to make any difference unless you have code that explicitly makes assumptions about that ordering. (The inheritance hierarchy of <code>B::*</code> objects has been changed to reflect this.)</p>

<h2 id="Elimination-of-SVt_PVBM"><a class="permalink" href="perl5100delta.html#Elimination-of-SVt_PVBM">#</a><a id="Elimination"></a>Elimination of SVt_PVBM</h2>

<p>Related to this, the internal type <code>SVt_PVBM</code> has been removed. This dedicated type of <code>SV</code> was used by the <code>index</code> operator and parts of the regexp engine to facilitate fast Boyer-Moore matches. Its use internally has been replaced by <code>SV</code>s of type <code>SVt_PVGV</code>.</p>

<h2 id="New-type-SVt_BIND"><a class="permalink" href="perl5100delta.html#New-type-SVt_BIND">#</a><a id="New7"></a>New type SVt_BIND</h2>

<p>A new type <code>SVt_BIND</code> has been added, in readiness for the project to implement Perl 6 on 5. There deliberately is no implementation yet, and they cannot yet be created or destroyed.</p>

<h2 id="Removal-of-CPP-symbols"><a class="permalink" href="perl5100delta.html#Removal-of-CPP-symbols">#</a><a id="Removal2"></a>Removal of CPP symbols</h2>

<p>The C preprocessor symbols <code>PERL_PM_APIVERSION</code> and <code>PERL_XS_APIVERSION</code>, which were supposed to give the version number of the oldest perl binary-compatible (resp. source-compatible) with the present one, were not used, and sometimes had misleading values. They have been removed.</p>

<h2 id="Less-space-is-used-by-ops"><a class="permalink" href="perl5100delta.html#Less-space-is-used-by-ops">#</a><a id="Less"></a>Less space is used by ops</h2>

<p>The <code>BASEOP</code> structure now uses less space. The <code>op_seq</code> field has been removed and replaced by a single bit bit-field <code>op_opt</code>. <code>op_type</code> is now 9 bits long. (Consequently, the <code>B::OP</code> class doesn&#39;t provide an <code>seq</code> method anymore.)</p>

<h2 id="New-parser"><a class="permalink" href="perl5100delta.html#New-parser">#</a><a id="New8"></a>New parser</h2>

<p>perl&#39;s parser is now generated by bison (it used to be generated by byacc.) As a result, it seems to be a bit more robust.</p>

<p>Also, Dave Mitchell improved the lexer debugging output under <code>-DT</code>.</p>

<h2 id="Use-of-const"><a class="permalink" href="perl5100delta.html#Use-of-const">#</a><a id="Use2"></a>Use of <code>const</code></h2>

<p>Andy Lester supplied many improvements to determine which function parameters and local variables could actually be declared <code>const</code> to the C compiler. Steve Peters provided new <code>*_set</code> macros and reworked the core to use these rather than assigning to macros in LVALUE context.</p>

<h2 id="Mathoms"><a class="permalink" href="perl5100delta.html#Mathoms">#</a>Mathoms</h2>

<p>A new file, <i>mathoms.c</i>, has been added. It contains functions that are no longer used in the perl core, but that remain available for binary or source compatibility reasons. However, those functions will not be compiled in if you add <code>-DNO_MATHOMS</code> in the compiler flags.</p>

<h2 id="AvFLAGS-has-been-removed"><a class="permalink" href="perl5100delta.html#AvFLAGS-has-been-removed">#</a><a id="AvFLAGS"></a><code>AvFLAGS</code> has been removed</h2>

<p>The <code>AvFLAGS</code> macro has been removed.</p>

<h2 id="av_*-changes"><a class="permalink" href="perl5100delta.html#av_*-changes">#</a><a id="av_"></a><a id="av_-changes"></a><code>av_*</code> changes</h2>

<p>The <code>av_*()</code> functions, used to manipulate arrays, no longer accept null <code>AV*</code> parameters.</p>

<h2 id="$^H-and-%^H"><a class="permalink" href="perl5100delta.html#$%5EH-and-%25%5EH">#</a><a id="H-and-H"></a>$^H and %^H</h2>

<p>The implementation of the special variables $^H and %^H has changed, to allow implementing lexical pragmas in pure Perl.</p>

<h2 id="B::-modules-inheritance-changed"><a class="permalink" href="perl5100delta.html#B::-modules-inheritance-changed">#</a><a id="B2"></a>B:: modules inheritance changed</h2>

<p>The inheritance hierarchy of <code>B::</code> modules has changed; <code>B::NV</code> now inherits from <code>B::SV</code> (it used to inherit from <code>B::IV</code>).</p>

<h2 id="Anonymous-hash-and-array-constructors"><a class="permalink" href="perl5100delta.html#Anonymous-hash-and-array-constructors">#</a><a id="Anonymous"></a>Anonymous hash and array constructors</h2>

<p>The anonymous hash and array constructors now take 1 op in the optree instead of 3, now that pp_anonhash and pp_anonlist return a reference to a hash/array when the op is flagged with OPf_SPECIAL. (Nicholas Clark)</p>

<h1 id="Known-Problems"><a class="permalink" href="perl5100delta.html#Known-Problems">#</a><a id="Known"></a>Known Problems</h1>

<p>There&#39;s still a remaining problem in the implementation of the lexical <code>$_</code>: it doesn&#39;t work inside <code>/(?{...})/</code> blocks. (See the TODO test in <i>t/op/mydef.t</i>.)</p>

<p>Stacked filetest operators won&#39;t work when the <code>filetest</code> pragma is in effect, because they rely on the stat() buffer <code>_</code> being populated, and filetest bypasses stat().</p>

<h2 id="UTF-8-problems"><a class="permalink" href="perl5100delta.html#UTF-8-problems">#</a><a id="UTF1"></a>UTF-8 problems</h2>

<p>The handling of Unicode still is unclean in several places, where it&#39;s dependent on whether a string is internally flagged as UTF-8. This will be made more consistent in perl 5.12, but that won&#39;t be possible without a certain amount of backwards incompatibility.</p>

<h1 id="Platform-Specific-Problems"><a class="permalink" href="perl5100delta.html#Platform-Specific-Problems">#</a><a id="Platform"></a>Platform Specific Problems</h1>

<p>When compiled with g++ and thread support on Linux, it&#39;s reported that the <code>$!</code> stops working correctly. This is related to the fact that the glibc provides two strerror_r(3) implementation, and perl selects the wrong one.</p>

<h1 id="Reporting-Bugs"><a class="permalink" href="perl5100delta.html#Reporting-Bugs">#</a><a id="Reporting"></a>Reporting Bugs</h1>

<p>If you find what you think is a bug, you might check the articles recently posted to the comp.lang.perl.misc newsgroup and the perl bug database at http://rt.perl.org/rt3/ . There may also be information at http://www.perl.org/ , the Perl Home Page.</p>

<p>If you believe you have an unreported bug, please run the <b>perlbug</b> program included with your release. Be sure to trim your bug down to a tiny but sufficient test case. Your bug report, along with the output of <code>perl -V</code>, will be sent off to perlbug@perl.org to be analysed by the Perl porting team.</p>

<h1 id="SEE-ALSO"><a class="permalink" href="perl5100delta.html#SEE-ALSO">#</a><a id="SEE"></a>SEE ALSO</h1>

<p>The <i>Changes</i> file and the perl590delta to perl595delta man pages for exhaustive details on what changed.</p>

<p>The <i>INSTALL</i> file for how to build Perl.</p>

<p>The <i>README</i> file for general stuff.</p>

<p>The <i>Artistic</i> and <i>Copying</i> files for copyright information.</p>


      </div>
      <div id="footer">
        <p>Perldoc Browser is maintained by Dan Book (<a href="https://metacpan.org/author/DBOOK">DBOOK</a>). Please contact him via the <a href="https://github.com/Grinnz/perldoc-browser/issues">GitHub issue tracker</a> or <a href="mailto:dbook@cpan.org">email</a> regarding any issues with the site itself, search, or rendering of documentation.</p>

<p>The Perl documentation is maintained by the Perl 5 Porters in the development of Perl. Please contact them via the <a href="https://github.com/Perl/perl5/issues">Perl issue tracker</a>, the <a href="https://lists.perl.org/list/perl5-porters.html">mailing list</a>, or <a href="https://kiwiirc.com/client/irc.perl.org/p5p">IRC</a> to report any issues with the contents or format of the documentation.</p>


      </div>
    </div>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.slim.min.js" integrity="sha512-/DXTXr6nQodMUiq+IUJYCt2PPOUjrHJ9wFrqpJ3XkgPNOZVfMok7cRw6CSxyCQxXn6ozlESsSh1/sMCTF1rL/g==" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.1/umd/popper.min.js" integrity="sha512-ubuT8Z88WxezgSqf3RLuNi5lmjstiJcyezx34yIU2gAHonIi27Na7atqzUZCOoY4CExaoFumzOsFQ2Ch+I/HCw==" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" crossorigin="anonymous"></script>
    <script src="../highlight.pack.js"></script>
    <script>hljs.highlightAll();</script>
  </body>
</html>
